diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2006-07-30 23:43:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-08-02 16:38:21 -0400 |
commit | 8d71740c56a9058acc4378504a356d543ff1308b (patch) | |
tree | f8be30892b75e7194b121d76adb9847d069f1759 /net/ipv4 | |
parent | 792d1932e319ff8ba01361e7d151b1794c55c31f (diff) |
[NET]: Core net changes to generate netevents
Generate netevents for:
- neighbour changes
- routing redirects
- pmtu changes
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 2dc6dbb28467..19bd49d69d9f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -104,6 +104,7 @@ | |||
104 | #include <net/icmp.h> | 104 | #include <net/icmp.h> |
105 | #include <net/xfrm.h> | 105 | #include <net/xfrm.h> |
106 | #include <net/ip_mp_alg.h> | 106 | #include <net/ip_mp_alg.h> |
107 | #include <net/netevent.h> | ||
107 | #ifdef CONFIG_SYSCTL | 108 | #ifdef CONFIG_SYSCTL |
108 | #include <linux/sysctl.h> | 109 | #include <linux/sysctl.h> |
109 | #endif | 110 | #endif |
@@ -1125,6 +1126,7 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, | |||
1125 | struct rtable *rth, **rthp; | 1126 | struct rtable *rth, **rthp; |
1126 | u32 skeys[2] = { saddr, 0 }; | 1127 | u32 skeys[2] = { saddr, 0 }; |
1127 | int ikeys[2] = { dev->ifindex, 0 }; | 1128 | int ikeys[2] = { dev->ifindex, 0 }; |
1129 | struct netevent_redirect netevent; | ||
1128 | 1130 | ||
1129 | if (!in_dev) | 1131 | if (!in_dev) |
1130 | return; | 1132 | return; |
@@ -1216,6 +1218,11 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, | |||
1216 | rt_drop(rt); | 1218 | rt_drop(rt); |
1217 | goto do_next; | 1219 | goto do_next; |
1218 | } | 1220 | } |
1221 | |||
1222 | netevent.old = &rth->u.dst; | ||
1223 | netevent.new = &rt->u.dst; | ||
1224 | call_netevent_notifiers(NETEVENT_REDIRECT, | ||
1225 | &netevent); | ||
1219 | 1226 | ||
1220 | rt_del(hash, rth); | 1227 | rt_del(hash, rth); |
1221 | if (!rt_intern_hash(hash, rt, &rt)) | 1228 | if (!rt_intern_hash(hash, rt, &rt)) |
@@ -1452,6 +1459,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
1452 | } | 1459 | } |
1453 | dst->metrics[RTAX_MTU-1] = mtu; | 1460 | dst->metrics[RTAX_MTU-1] = mtu; |
1454 | dst_set_expires(dst, ip_rt_mtu_expires); | 1461 | dst_set_expires(dst, ip_rt_mtu_expires); |
1462 | call_netevent_notifiers(NETEVENT_PMTU_UPDATE, dst); | ||
1455 | } | 1463 | } |
1456 | } | 1464 | } |
1457 | 1465 | ||