aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-10-02 14:25:43 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-02 14:25:43 -0400
commit739e4a758e0e2930f4bcdddd244254bae8dd7499 (patch)
tree0179d038669ad55591ae05a90b210d7090edf56e /net/ipv4
parentd068b02cfdfc27f5962ec82ec5568b706f599edc (diff)
parent50dddff3cb9af328dd42bafe3437c7f47e8b38a9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/usb/r8152.c net/netfilter/nfnetlink.c Both r8152 and nfnetlink conflicts were simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_tunnel.c11
-rw-r--r--net/ipv4/route.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index b75b47b0a223..2272de90c2d4 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -853,9 +853,14 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
853 853
854 t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type); 854 t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type);
855 855
856 if (!t && (cmd == SIOCADDTUNNEL)) { 856 if (cmd == SIOCADDTUNNEL) {
857 t = ip_tunnel_create(net, itn, p); 857 if (!t) {
858 err = PTR_ERR_OR_ZERO(t); 858 t = ip_tunnel_create(net, itn, p);
859 err = PTR_ERR_OR_ZERO(t);
860 break;
861 }
862
863 err = -EEXIST;
859 break; 864 break;
860 } 865 }
861 if (dev != itn->fb_tunnel_dev && cmd == SIOCCHGTUNNEL) { 866 if (dev != itn->fb_tunnel_dev && cmd == SIOCCHGTUNNEL) {
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index d4bd68dcdc39..793c0bb8c4fd 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -746,7 +746,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
746 } 746 }
747 747
748 n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw); 748 n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw);
749 if (n) { 749 if (!IS_ERR(n)) {
750 if (!(n->nud_state & NUD_VALID)) { 750 if (!(n->nud_state & NUD_VALID)) {
751 neigh_event_send(n, NULL); 751 neigh_event_send(n, NULL);
752 } else { 752 } else {