From 6371cd0b4cc8380867c9709163139c8e42538b9f Mon Sep 17 00:00:00 2001 From: bket Date: Wed, 10 Nov 2021 20:24:22 +0000 Subject: [PATCH] Give sppp(4) its own RTP_PROPOSAL priority OK semarie@ --- sbin/route/route.c | 5 ++++- share/man/man4/route.4 | 7 ++++--- sys/net/if_spppsubr.c | 4 ++-- sys/net/route.h | 5 +++-- usr.sbin/unwindctl/unwindctl.c | 4 +++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sbin/route/route.c b/sbin/route/route.c index 952d9446943..fc58858b2a1 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.259 2021/10/23 09:28:48 kn Exp $ */ +/* $OpenBSD: route.c,v 1.260 2021/11/10 20:24:22 bket Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -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 a/share/man/man4/route.4 b/share/man/man4/route.4 index 5085487a1fb..5f96e4f0939 100644 --- a/share/man/man4/route.4 +++ b/share/man/man4/route.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: route.4,v 1.55 2020/08/21 13:20:14 benno Exp $ +.\" $OpenBSD: route.4,v 1.56 2021/11/10 20:24:22 bket Exp $ .\" $NetBSD: route.4,v 1.3 1994/11/30 16:22:31 jtc Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)route.4 8.6 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: August 21 2020 $ +.Dd $Mdocdate: November 10 2021 $ .Dt ROUTE 4 .Os .Sh NAME @@ -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 a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 0d30ac99bfd..759370e7be7 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.188 2021/11/10 15:04:26 bket Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.189 2021/11/10 20:24:22 bket Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -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 a/sys/net/route.h b/sys/net/route.h index 914581aa6bb..c0bba8b5734 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.185 2021/03/17 09:05:42 claudio Exp $ */ +/* $OpenBSD: route.h,v 1.186 2021/11/10 20:24:22 bket Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -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 a/usr.sbin/unwindctl/unwindctl.c b/usr.sbin/unwindctl/unwindctl.c index 9380abb937e..3e64d6ad5a5 100644 --- a/usr.sbin/unwindctl/unwindctl.c +++ b/usr.sbin/unwindctl/unwindctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwindctl.c,v 1.28 2021/09/08 11:38:39 tobhe Exp $ */ +/* $OpenBSD: unwindctl.c,v 1.29 2021/11/10 20:24:22 bket Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -67,6 +67,8 @@ prio2str(int prio) return "STATIC"; case RTP_PROPOSAL_UMB: return "UMB"; + case RTP_PROPOSAL_PPP: + return "PPP"; } return "OTHER"; } -- 2.20.1