Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289764
b: refs/heads/master
c: 1e2927b
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 26, 2012
1 parent 1dd9fa4 commit 350fe72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39232973b779ab0c02cb6dcd8f819b7cb0fcd09a
refs/heads/master: 1e2927b08160a14fff98e88e7a331d916aaa1d56
20 changes: 15 additions & 5 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,10 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
/* ISATAP (RFC4214) - must come before 6to4 */
if (dev->priv_flags & IFF_ISATAP) {
struct neighbour *neigh = NULL;
bool do_tx_error = false;

if (skb_dst(skb))
neigh = dst_get_neighbour_noref(skb_dst(skb));
neigh = dst_neigh_lookup(skb_dst(skb), &iph6->daddr);

if (neigh == NULL) {
if (net_ratelimit())
Expand All @@ -697,6 +698,10 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
ipv6_addr_is_isatap(addr6))
dst = addr6->s6_addr32[3];
else
do_tx_error = true;

neigh_release(neigh);
if (do_tx_error)
goto tx_error;
}

Expand All @@ -705,9 +710,10 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,

if (!dst) {
struct neighbour *neigh = NULL;
bool do_tx_error = false;

if (skb_dst(skb))
neigh = dst_get_neighbour_noref(skb_dst(skb));
neigh = dst_neigh_lookup(skb_dst(skb), &iph6->daddr);

if (neigh == NULL) {
if (net_ratelimit())
Expand All @@ -723,10 +729,14 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
addr_type = ipv6_addr_type(addr6);
}

if ((addr_type & IPV6_ADDR_COMPATv4) == 0)
goto tx_error_icmp;
if ((addr_type & IPV6_ADDR_COMPATv4) != 0)
dst = addr6->s6_addr32[3];
else
do_tx_error = true;

dst = addr6->s6_addr32[3];
neigh_release(neigh);
if (do_tx_error)
goto tx_error;
}

rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,
Expand Down

0 comments on commit 350fe72

Please sign in to comment.