diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-01-21 06:18:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:44 -0500 |
commit | 1e637c74b0f84eaca02b914c0b8c6f67276e9697 (patch) | |
tree | 18e42bbac80529c36ac3e6a8e5b68538e0db10df /net/ipv4/route.c | |
parent | 96750162b5f7350ec7ba7cf747a6623858d65dd2 (diff) |
[IPV4]: Enable use of 240/4 address space.
This short patch modifies the IPv4 networking to enable use of the
240.0.0.0/4 (aka "class-E") address space as propsed in the internet
draft draft-fuller-240space-00.txt.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index fc0145385e80..f80c761ea0bb 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1154,7 +1154,7 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw, | |||
1154 | return; | 1154 | return; |
1155 | 1155 | ||
1156 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) | 1156 | if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) |
1157 | || ipv4_is_multicast(new_gw) || ipv4_is_badclass(new_gw) | 1157 | || ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) |
1158 | || ipv4_is_zeronet(new_gw)) | 1158 | || ipv4_is_zeronet(new_gw)) |
1159 | goto reject_redirect; | 1159 | goto reject_redirect; |
1160 | 1160 | ||
@@ -1634,7 +1634,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
1634 | if (in_dev == NULL) | 1634 | if (in_dev == NULL) |
1635 | return -EINVAL; | 1635 | return -EINVAL; |
1636 | 1636 | ||
1637 | if (ipv4_is_multicast(saddr) || ipv4_is_badclass(saddr) || | 1637 | if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) || |
1638 | ipv4_is_loopback(saddr) || skb->protocol != htons(ETH_P_IP)) | 1638 | ipv4_is_loopback(saddr) || skb->protocol != htons(ETH_P_IP)) |
1639 | goto e_inval; | 1639 | goto e_inval; |
1640 | 1640 | ||
@@ -1891,7 +1891,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
1891 | by fib_lookup. | 1891 | by fib_lookup. |
1892 | */ | 1892 | */ |
1893 | 1893 | ||
1894 | if (ipv4_is_multicast(saddr) || ipv4_is_badclass(saddr) || | 1894 | if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) || |
1895 | ipv4_is_loopback(saddr)) | 1895 | ipv4_is_loopback(saddr)) |
1896 | goto martian_source; | 1896 | goto martian_source; |
1897 | 1897 | ||
@@ -1904,7 +1904,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
1904 | if (ipv4_is_zeronet(saddr)) | 1904 | if (ipv4_is_zeronet(saddr)) |
1905 | goto martian_source; | 1905 | goto martian_source; |
1906 | 1906 | ||
1907 | if (ipv4_is_badclass(daddr) || ipv4_is_zeronet(daddr) || | 1907 | if (ipv4_is_lbcast(daddr) || ipv4_is_zeronet(daddr) || |
1908 | ipv4_is_loopback(daddr)) | 1908 | ipv4_is_loopback(daddr)) |
1909 | goto martian_destination; | 1909 | goto martian_destination; |
1910 | 1910 | ||
@@ -2125,7 +2125,7 @@ static inline int __mkroute_output(struct rtable **result, | |||
2125 | res->type = RTN_BROADCAST; | 2125 | res->type = RTN_BROADCAST; |
2126 | else if (ipv4_is_multicast(fl->fl4_dst)) | 2126 | else if (ipv4_is_multicast(fl->fl4_dst)) |
2127 | res->type = RTN_MULTICAST; | 2127 | res->type = RTN_MULTICAST; |
2128 | else if (ipv4_is_badclass(fl->fl4_dst) || ipv4_is_zeronet(fl->fl4_dst)) | 2128 | else if (ipv4_is_lbcast(fl->fl4_dst) || ipv4_is_zeronet(fl->fl4_dst)) |
2129 | return -EINVAL; | 2129 | return -EINVAL; |
2130 | 2130 | ||
2131 | if (dev_out->flags & IFF_LOOPBACK) | 2131 | if (dev_out->flags & IFF_LOOPBACK) |
@@ -2276,7 +2276,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) | |||
2276 | if (oldflp->fl4_src) { | 2276 | if (oldflp->fl4_src) { |
2277 | err = -EINVAL; | 2277 | err = -EINVAL; |
2278 | if (ipv4_is_multicast(oldflp->fl4_src) || | 2278 | if (ipv4_is_multicast(oldflp->fl4_src) || |
2279 | ipv4_is_badclass(oldflp->fl4_src) || | 2279 | ipv4_is_lbcast(oldflp->fl4_src) || |
2280 | ipv4_is_zeronet(oldflp->fl4_src)) | 2280 | ipv4_is_zeronet(oldflp->fl4_src)) |
2281 | goto out; | 2281 | goto out; |
2282 | 2282 | ||