Re: sys/netinet6/nd6.c: add ND6_IFF_ACCEPT_RTADV flag

看板DFBSD_submit作者時間21年前 (2004/12/29 21:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/6 (看更多)
----Security_Multipart0(Wed_Dec_29_21_10_53_2004_261)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Dec_29_21_10_53_2004_546)--" Content-Transfer-Encoding: 7bit ----Next_Part(Wed_Dec_29_21_10_53_2004_546)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hiroki Sato <hrs@allbsd.org> wrote in <20041229.071648.02292479.hrs@eos.ocn.ne.jp>: hrs> Changes to the userland utility are needed, too. KAME implements hrs> ndp(8) to handle the flag and I think I will submit the patch soon. The patch is attached. -- | Hiroki SATO ----Next_Part(Wed_Dec_29_21_10_53_2004_546)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ndp.diff" Add a flag for ND6_IFF_ACCEPT_RTADV. Obtained from: KAME via FreeBSD References: KAME: kame/kame/kame/ndp/ndp.c 1.77 FreeBSD: src/usr.sbin/ndp/ndp.c 1.2.2.6 Index: ndp.c =================================================================== RCS file: /cvs/src/usr.sbin/ndp/ndp.c,v retrieving revision 1.5 diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.5 ndp.c --- ndp.c 18 Dec 2004 22:48:04 -0000 1.5 +++ ndp.c 29 Dec 2004 10:33:53 -0000 @@ -923,7 +923,9 @@ }\ } while (0) SETFLAG("nud", ND6_IFF_PERFORMNUD); - +#ifdef ND6_IFF_ACCEPT_RTADV + SETFLAG("accept_rtadv", ND6_IFF_ACCEPT_RTADV); +#endif ND.flags = newflags; if (ioctl(s, SIOCSIFINFO_FLAGS, (caddr_t)&nd) < 0) { perror("ioctl(SIOCSIFINFO_FLAGS)"); @@ -966,8 +968,12 @@ #endif if (ND.flags) { printf("\nFlags: "); - if ((ND.flags & ND6_IFF_PERFORMNUD) != 0) - printf("PERFORMNUD "); + if ((ND.flags & ND6_IFF_PERFORMNUD)) + printf("nud "); +#ifdef ND6_IFF_ACCEPT_RTADV + if ((ND.flags & ND6_IFF_ACCEPT_RTADV)) + printf("accept_rtadv "); +#endif } putc('\n', stdout); #undef ND ----Next_Part(Wed_Dec_29_21_10_53_2004_546)---- ----Security_Multipart0(Wed_Dec_29_21_10_53_2004_261)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBB0p7NTyzT2CeTzy0RAr9aAJ9q6v8fjOgMueWKuzsOQltk6lsRSACdG458 HzaJtxhjrdxWswz/jjgpZQQ= =i8ad -----END PGP SIGNATURE----- ----Security_Multipart0(Wed_Dec_29_21_10_53_2004_261)----
文章代碼(AID): #11qh7i00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #11qh7i00 (DFBSD_submit)