diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-11-17 01:05:29 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-11-17 01:05:29 +0000 |
commit | f8d64c469aa68f5ce9ef485d9414a30aac3f1d76 (patch) | |
tree | d1ee8696995c1d2e949c6c1516ab3404756ef029 /sys/net/route.h | |
parent | b7e0e3bf158c1e992123063dadd0a32266ab1069 (diff) | |
download | FreeBSD-src-f8d64c469aa68f5ce9ef485d9414a30aac3f1d76.zip FreeBSD-src-f8d64c469aa68f5ce9ef485d9414a30aac3f1d76.tar.gz |
Finish r274175: do control plane MTU tracking.
Update route MTU in case of ifnet MTU change.
Add new RTF_FIXEDMTU to track explicitly specified MTU.
Old behavior:
ifconfig em0 mtu 1500->9000 -> all routes traversing em0 do not change MTU.
User has to manually update all routes.
ifconfig em0 mtu 9000->1500 -> all routes traversing em0 do not change MTU.
However, if ip[6]_output finds route with rt_mtu > interface mtu, rt_mtu
gets updated.
New behavior:
ifconfig em0 mtu 1500->9000 -> all interface routes in all fibs gets updated
with new MTU unless RTF_FIXEDMTU flag set on them.
ifconfig em0 mtu 9000->1500 -> all routes in all fibs gets updated with new
MTU unless RTF_FIXEDMTU flag set on them AND rt_mtu is less than ifp mtu.
route add ... -mtu XXX automatically sets RTF_FIXEDMTU flag.
route change .. -mtu 0 automatically removes RTF_FIXEDMTU flag.
PR: 194238
MFC after: 1 month
CR: D1125
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index bbdf98d..ef00877 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -151,7 +151,7 @@ struct rtentry { /* 0x10000 unused, was RTF_PRCLONING */ /* 0x20000 unused, was RTF_WASCLONED */ #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ -/* 0x80000 unused */ +#define RTF_FIXEDMTU 0x80000 /* MTU was explicitly specified */ #define RTF_PINNED 0x100000 /* route is immutable */ #define RTF_LOCAL 0x200000 /* route represents a local address */ #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ @@ -378,6 +378,7 @@ int rtsock_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int); int rt_expunge(struct radix_node_head *, struct rtentry *); void rtfree(struct rtentry *); int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *); +void rt_updatemtu(struct ifnet *); /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ /* Thes are used by old code not yet converted to use multiple FIBS */ |