On Wed, Nov 10, 2021 at 04:22:49PM +0100, Bjorn Ketelaars wrote:
> sppp(4) is currently using RTP_PROPOSAL_STATIC for sending DNS
> proposals, whereas all others sources, e.g. umb(4), are using a specific
> value. Diff below fixes this by adding RTP_PROPOSAL_PPP.
> 
> Although the diff is limited in size it touches several pieces:
> - sppp(4)
> - route(4)
> - route(8)
> - unwindctl(8)
> 
> Thanks to semarie@ for noting the above. Thanks to claudio@ for
> suggesting RTP_PROPOSAL_PPP.
> 
> Comments/OK?

ok semarie@

I just wonder about the system behaviour after building a new kernel
and rebooting to build userland: RTP_PROPOSAL_SOLICIT is changed and
kernel/userland will mismatch.

But UMB proposal was done this way too (moving RTP_PROPOSAL_SOLICIT to
next id). So disturb shouldn't be big.


> diff --git sbin/route/route.c sbin/route/route.c
> index 952d9446943..f92d1419125 100644
> --- sbin/route/route.c
> +++ sbin/route/route.c
> @@ -1513,6 +1513,9 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
>               case RTP_PROPOSAL_UMB:
>                       printf("umb");
>                       break;
> +             case RTP_PROPOSAL_PPP:
> +                     printf("ppp");
> +                     break;
>               case RTP_PROPOSAL_SOLICIT:
>                       printf("solicit");
>                       break;
> diff --git share/man/man4/route.4 share/man/man4/route.4
> index 5085487a1fb..a09b6e87e12 100644
> --- share/man/man4/route.4
> +++ share/man/man4/route.4
> @@ -282,7 +282,8 @@ The predefined constants for the routing priorities are:
>  #define RTP_PROPOSAL_DHCLIENT        58
>  #define RTP_PROPOSAL_SLAAC   59
>  #define RTP_PROPOSAL_UMB     60
> -#define RTP_PROPOSAL_SOLICIT 61      /* request reply of all RTM_PROPOSAL */
> +#define RTP_PROPOSAL_PPP     61
> +#define RTP_PROPOSAL_SOLICIT 62      /* request reply of all RTM_PROPOSAL */
>  #define RTP_MAX              63      /* maximum priority */
>  #define RTP_ANY              64      /* any of the above */
>  #define RTP_MASK     0x7f
> diff --git sys/net/if_spppsubr.c sys/net/if_spppsubr.c
> index 6cff6a3585e..882c97d5ce1 100644
> --- sys/net/if_spppsubr.c
> +++ sys/net/if_spppsubr.c
> @@ -4931,7 +4931,7 @@ sppp_update_dns(struct ifnet *ifp)
>       rtdns.sr_len = 2 + i * sz;
>       info.rti_info[RTAX_DNS] = srtdnstosa(&rtdns);
>  
> -     rtm_proposal(ifp, &info, flag, RTP_PROPOSAL_STATIC);
> +     rtm_proposal(ifp, &info, flag, RTP_PROPOSAL_PPP);
>  }
>  
>  void
> diff --git sys/net/route.h sys/net/route.h
> index 914581aa6bb..acc07f06f7d 100644
> --- sys/net/route.h
> +++ sys/net/route.h
> @@ -171,7 +171,8 @@ struct rtentry {
>  #define RTP_PROPOSAL_DHCLIENT        58
>  #define RTP_PROPOSAL_SLAAC   59
>  #define RTP_PROPOSAL_UMB     60
> -#define RTP_PROPOSAL_SOLICIT 61      /* request reply of all RTM_PROPOSAL */
> +#define RTP_PROPOSAL_PPP     61
> +#define RTP_PROPOSAL_SOLICIT 62      /* request reply of all RTM_PROPOSAL */
>  #define RTP_MAX              63      /* maximum priority */
>  #define RTP_ANY              64      /* any of the above */
>  #define RTP_MASK     0x7f
> diff --git usr.sbin/unwindctl/unwindctl.c usr.sbin/unwindctl/unwindctl.c
> index 9380abb937e..10db694e414 100644
> --- usr.sbin/unwindctl/unwindctl.c
> +++ usr.sbin/unwindctl/unwindctl.c
> @@ -67,6 +67,8 @@ prio2str(int prio)
>               return "STATIC";
>       case RTP_PROPOSAL_UMB:
>               return "UMB";
> +     case RTP_PROPOSAL_PPP:
> +             return "PPP";
>       }
>       return "OTHER";
>  }

-- 
Sebastien Marie

Reply via email to