Date: Thu, 16 Aug 2001 15:54:21 -0300 From: "Daniel C. Sobral" <daniel.sobral@tcoip.com.br> To: Ruslan Ermilov <ru@FreeBSD.ORG> Cc: net@FreeBSD.ORG Subject: Re: RTM_INFO Message-ID: <3B7C16DD.5020100@tcoip.com.br> References: <3B7BC5CE.7040906@tcoip.com.br> <20010816162611.G73183@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote: > On Thu, Aug 16, 2001 at 10:08:30AM -0300, Daniel C. Sobral wrote: > >>Another question... when the interface goes up and an RTM_INFO message >> > s/RTM_INFO/RTM_IFINFO > >>is generated, shouldn't the interface addresses be passed? >> >> > Why? In the down/up event, only interface's status changes: So interested parties may get that if they want. Actually Solaris does not generate events for interface address changes on an interface that is down, but apparently does pass the if addresses on RTM_IFINFO (meaning Zebra plays nice with Solaris but not with FreeBSD). > : # route -vn monitor Damn, I wrote a whole program to do just that! > : got message of size 124 on Thu Aug 16 16:19:12 2001 > : RTM_DELETE: Delete Route: len 124, pid: 0, seq 0, errno 0, flags:<HOST,LOCAL> > : locks: inits: > : sockaddrs: <DST,GATEWAY> > : 127.0.0.1 127.0.0.1 > : > : got message of size 116 on Thu Aug 16 16:19:12 2001 > : RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:<UP> > : sockaddrs: <NETMASK,IFP,IFA,BRD> > : (0) 0 ff lo0 127.0.0.1 127.0.0.1 > : > : got message of size 96 on Thu Aug 16 16:19:12 2001 > : RTM_IFINFO: iface status change: len 96, if# 3, flags:<LOOPBACK,RUNNING,MULTICAST> > : > : got message of size 116 on Thu Aug 16 16:21:02 2001 > : RTM_NEWADDR: address being added to iface: len 116, metric 0, flags: > : sockaddrs: <NETMASK,IFP,IFA,BRD> > : (0) 0 ff lo0 127.0.0.1 127.0.0.1 > : > : got message of size 124 on Thu Aug 16 16:21:02 2001 > : RTM_ADD: Add Route: len 124, pid: 0, seq 0, errno 0, flags:<UP,HOST,LOCAL> > : locks: inits: > : sockaddrs: <DST,GATEWAY> > : 127.0.0.1 127.0.0.1 > : > : got message of size 96 on Thu Aug 16 16:21:02 2001 > : RTM_IFINFO: iface status change: len 96, if# 3, flags:<UP,LOOPBACK,RUNNING,MULTICAST> > > The first three are from ``ifconfig lo0 down'', and first two of them are from > in_ifscrub() which deletes interface route. > > The last three are from ``ifconfig lo0 up'', and first two of them are from > in_ifinit() which adds interface route. Funny, my results are somewhat different: got message of size 96 on Thu Aug 16 15:39:06 2001 RTM_IFINFO: iface status change: len 96, if# 8, flags:<BROADCAST,RUNNING,SIMPLEX,MULTICAST> got message of size 140 on Thu Aug 16 15:39:06 2001 RTM_ADD: Add Route: len 140, pid: 3310, seq 885, errno 0, flags:<UP,GATEWAY,DONE,PROTO1> locks: inits: <hopcount> sockaddrs: <DST,GATEWAY,NETMASK> 10.9.33.0 172.31.199.3 (0) 0 ffff 80ff 0 0 0 0 got message of size 96 on Thu Aug 16 15:39:17 2001 RTM_IFINFO: iface status change: len 96, if# 8, flags:<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> First is ifconfig vlan2 down, second is OSPF rerouting it, third is ifconfig vlan2 up. -- Daniel C. Sobral (8-DCS) Daniel.Sobral@tcoip.com.br dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net A proper wife should be as obedient as a slave... The female is a female by virtue of a certain lack of qualities -- a natural defectiveness. -- Aristotle To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B7C16DD.5020100>