It's done in the arp_rtrequest() function and is controlled by the net.link.ether.inet.useloopback sysctl.
On Mon, Dec 16, 2002 at 03:39:48AM -0800, Svetoslav Agafonkin wrote: > > flober# uname -a > FreeBSD flober 4.7-RELEASE FreeBSD 4.7-RELEASE #5: > Thu Dec 5 22:01:28 EET 2002 > root@flober:/usr/obj/usr/src/sys/AKERNEL i386 > > I've got this question about flags C (RTF_CLONING) > and W (RTF_WASCLONED)(struct rtentry): > > Let there are two active interfaces - fxp0 > (ethernet) i lo0 (loopback): > > flober# ifconfig > > fxp0: > flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu > 1500 > inet 192.168.1.1 netmask 0xffffff00 broadcast > 192.168.1.255 > ether 00:06:29:b0:df:65 > media: Ethernet autoselect (none) > status: no carrier > lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu > 1500 > ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 > sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu > 552 > faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500 > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu > 16384 > inet 127.0.0.1 netmask 0xff000000 > > > initial routing table : > > flober# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs > Use Netif Expire > 127.0.0.1 127.0.0.1 UH 0 > 0 lo0 > 192.168.1 link#1 UC 0 > 0 fxp0 > > the flag C in the entry route to 192.168.1.0/24 means > that every time we use that entry (via > rtalloc/rtrequest/rtrequest_ign(/sys/net/route.c)) it > will be cloned (i.e. a new entry will be created > using the old a a template).Let's see: > > for example: > > flober# ping 192.168.1.1 > > ... > > flober# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs > Use Netif Expire > 127.0.0.1 127.0.0.1 UH 0 > 0 lo0 > 192.168.1 link#1 UC 1 > 0 fxp0 > 192.168.1.1 00:06:29:b0:df:65 UHLW 0 > 4 lo0 > > How fxp0 interface is changed to lo0? Where exactly in > the source (rtrequest)this is done? > > > Svetoslav Agafonkin > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-net" in the body of the message -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age
msg07871/pgp00000.pgp
Description: PGP signature