Commit 64fd39d9 authored by David S. Miller's avatar David S. Miller Committed by David S. Miller

[TCP/IPV6]: Check for anycast where we check for multicast.

parent 9c5c251a
......@@ -967,11 +967,13 @@ static void tcp_v6_send_reset(struct sk_buff *skb)
struct tcphdr *th = skb->h.th, *t1;
struct sk_buff *buff;
struct flowi fl;
int daddr_type;
if (th->rst)
return;
if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
daddr_type = ipv6_addr_type(&skb->nh.ipv6h->daddr);
if (daddr_type & (IPV6_ADDR_ANYCAST | IPV6_ADDR_MULTICAST))
return;
/*
......@@ -1171,12 +1173,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
struct tcp_opt tmptp, *tp = tcp_sk(sk);
struct open_request *req = NULL;
__u32 isn = TCP_SKB_CB(skb)->when;
int daddr_type;
if (skb->protocol == htons(ETH_P_IP))
return tcp_v4_conn_request(sk, skb);
/* FIXME: do the same check for anycast */
if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr))
daddr_type = ipv6_addr_type(&skb->nh.ipv6h->daddr);
if (daddr_type & (IPV6_ADDR_ANYCAST | IPV6_ADDR_MULTICAST))
goto drop;
/*
......
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