Commit 2135f3fb authored by David S. Miller's avatar David S. Miller

[TCP/IPV6]: Revert previous anycast changes.

parent 86df0e66
...@@ -579,7 +579,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, ...@@ -579,7 +579,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
addr_type = ipv6_addr_type(&usin->sin6_addr); addr_type = ipv6_addr_type(&usin->sin6_addr);
if (addr_type & (IPV6_ADDR_ANYCAST | IPV6_ADDR_MULTICAST)) if(addr_type & IPV6_ADDR_MULTICAST)
return -ENETUNREACH; return -ENETUNREACH;
if (addr_type&IPV6_ADDR_LINKLOCAL) { if (addr_type&IPV6_ADDR_LINKLOCAL) {
...@@ -967,14 +967,12 @@ static void tcp_v6_send_reset(struct sk_buff *skb) ...@@ -967,14 +967,12 @@ static void tcp_v6_send_reset(struct sk_buff *skb)
struct tcphdr *th = skb->h.th, *t1; struct tcphdr *th = skb->h.th, *t1;
struct sk_buff *buff; struct sk_buff *buff;
struct flowi fl; struct flowi fl;
int daddr_type;
if (th->rst) if (th->rst)
return; return;
daddr_type = ipv6_addr_type(&skb->nh.ipv6h->daddr); if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
if (daddr_type & (IPV6_ADDR_ANYCAST | IPV6_ADDR_MULTICAST)) return;
return;
/* /*
* We need to grab some memory, and put together an RST, * We need to grab some memory, and put together an RST,
...@@ -1173,14 +1171,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) ...@@ -1173,14 +1171,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
struct tcp_opt tmptp, *tp = tcp_sk(sk); struct tcp_opt tmptp, *tp = tcp_sk(sk);
struct open_request *req = NULL; struct open_request *req = NULL;
__u32 isn = TCP_SKB_CB(skb)->when; __u32 isn = TCP_SKB_CB(skb)->when;
int daddr_type;
if (skb->protocol == htons(ETH_P_IP)) if (skb->protocol == htons(ETH_P_IP))
return tcp_v4_conn_request(sk, skb); return tcp_v4_conn_request(sk, skb);
daddr_type = ipv6_addr_type(&skb->nh.ipv6h->daddr); /* FIXME: do the same check for anycast */
if (daddr_type & (IPV6_ADDR_ANYCAST | IPV6_ADDR_MULTICAST)) if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
goto drop; goto drop;
/* /*
* There are no SYN attacks on IPv6, yet... * There are no SYN attacks on IPv6, yet...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment