diff options
author | brian <brian@FreeBSD.org> | 1997-11-09 03:22:49 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-09 03:22:49 +0000 |
commit | 682b093038c2d7298dc7bd49dacdb65afa73f686 (patch) | |
tree | 0ebf981c370756ad1754f15bebdf2020814a8e64 /usr.sbin/ppp | |
parent | 73454caef19493ac459a1f716f90120f144497ab (diff) | |
download | FreeBSD-src-682b093038c2d7298dc7bd49dacdb65afa73f686.zip FreeBSD-src-682b093038c2d7298dc7bd49dacdb65afa73f686.tar.gz |
Don't include RTA_GATEWAY in rtm_addrs unless it's specified.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index 2efc598..8bca1f2 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: route.c,v 1.20 1997/10/26 01:03:37 brian Exp $ + * $Id: route.c,v 1.21 1997/11/08 00:28:11 brian Exp $ * */ @@ -75,7 +75,7 @@ OsSetRoute(int cmd, memset(&rtmes, '\0', sizeof(rtmes)); rtmes.m_rtm.rtm_version = RTM_VERSION; rtmes.m_rtm.rtm_type = cmd; - rtmes.m_rtm.rtm_addrs = RTA_DST | RTA_NETMASK | RTA_GATEWAY; + rtmes.m_rtm.rtm_addrs = RTA_DST | RTA_NETMASK; rtmes.m_rtm.rtm_seq = ++seqno; rtmes.m_rtm.rtm_pid = getpid(); rtmes.m_rtm.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC; @@ -93,6 +93,7 @@ OsSetRoute(int cmd, rtdata.sin_addr = gateway; memcpy(cp, &rtdata, 16); cp += 16; + rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY; } if (dst.s_addr == INADDR_ANY) mask.s_addr = INADDR_ANY; |