文章目錄
- 問題
問題
最近在看一個路由的問題,順便看內核代碼,發現在添加IP的時候,內核會自動添加一個local route。
net/ipv4/devinet.c
inet_rtm_newaddr->__inet_insert_ifa
/* Send message first, then call notifier.Notifier will trigger FIB update, so thatlisteners of netlink will know about new ifaddr */
rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid);
blocking_notifie