]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec
authorDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2016 20:12:37 +0000 (13:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2016 20:12:37 +0000 (13:12 -0700)
Steffen Klassert says:

====================
ipsec 2016-09-08

1) Fix a crash when xfrm_dump_sa returns an error.
   From Vegard Nossum.

2) Remove some incorrect WARN() on normal error handling.
   From Vegard Nossum.

3) Ignore socket policies when rebuilding hash tables,
   socket policies are not inserted into the hash tables.
   From Tobias Brunner.

4) Initialize and check tunnel pointers properly before
   we use it. From Alexey Kodanev.

5) Fix l3mdev oif setting on xfrm dst lookups.
   From David Ahern.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c

diff --combined net/ipv4/xfrm4_policy.c
index b644a23c3db06e851b239e694f22ed7a869653a3,e07ed8b1deb39e0ee6f75b4db25763b3a91a40e2..41f5b504a782c392a20594325706c199136ecaa5
@@@ -29,7 -29,7 +29,7 @@@ static struct dst_entry *__xfrm4_dst_lo
        memset(fl4, 0, sizeof(*fl4));
        fl4->daddr = daddr->a4;
        fl4->flowi4_tos = tos;
-       fl4->flowi4_oif = oif;
+       fl4->flowi4_oif = l3mdev_master_ifindex_by_index(net, oif);
        if (saddr)
                fl4->saddr = saddr->a4;
  
@@@ -295,7 -295,7 +295,7 @@@ static struct ctl_table xfrm4_policy_ta
        { }
  };
  
 -static int __net_init xfrm4_net_sysctl_init(struct net *net)
 +static __net_init int xfrm4_net_sysctl_init(struct net *net)
  {
        struct ctl_table *table;
        struct ctl_table_header *hdr;
@@@ -323,7 -323,7 +323,7 @@@ err_alloc
        return -ENOMEM;
  }
  
 -static void __net_exit xfrm4_net_sysctl_exit(struct net *net)
 +static __net_exit void xfrm4_net_sysctl_exit(struct net *net)
  {
        struct ctl_table *table;
  
                kfree(table);
  }
  #else /* CONFIG_SYSCTL */
 -static int inline xfrm4_net_sysctl_init(struct net *net)
 +static inline int xfrm4_net_sysctl_init(struct net *net)
  {
        return 0;
  }
  
 -static void inline xfrm4_net_sysctl_exit(struct net *net)
 +static inline void xfrm4_net_sysctl_exit(struct net *net)
  {
  }
  #endif
diff --combined net/ipv6/xfrm6_policy.c
index 6cc97003e4a9547462840c113fcf11be4bb92ed3,dd84ecd1221bfa6fe409074e5eb1d15c43301c66..70a86adad875b66d3643ecfb073ea7681a53908d
@@@ -36,7 -36,7 +36,7 @@@ static struct dst_entry *xfrm6_dst_look
        int err;
  
        memset(&fl6, 0, sizeof(fl6));
-       fl6.flowi6_oif = oif;
+       fl6.flowi6_oif = l3mdev_master_ifindex_by_index(net, oif);
        fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF;
        memcpy(&fl6.daddr, daddr, sizeof(fl6.daddr));
        if (saddr)
@@@ -366,12 -366,12 +366,12 @@@ static void __net_exit xfrm6_net_sysctl
                kfree(table);
  }
  #else /* CONFIG_SYSCTL */
 -static int inline xfrm6_net_sysctl_init(struct net *net)
 +static inline int xfrm6_net_sysctl_init(struct net *net)
  {
        return 0;
  }
  
 -static void inline xfrm6_net_sysctl_exit(struct net *net)
 +static inline void xfrm6_net_sysctl_exit(struct net *net)
  {
  }
  #endif