1. 11 May, 2016 6 commits
    • David S. Miller's avatar
      Merge branch 'vrf-pktinfo' · c3f1010b
      David S. Miller authored
      David Ahern says:
      
      ====================
      net: vrf: Fixup PKTINFO to return enslaved device index
      
      Applications such as OSPF and BFD need the original ingress device not
      the VRF device; the latter can be derived from the former. To that end
      move the packet intercept from an rx handler that is invoked by
      __netif_receive_skb_core to the ipv4 and ipv6 receive processing.
      
      IPv6 already saves the skb_iif to the control buffer in ipv6_rcv. Since
      the skb->dev has not been switched the cb has the enslaved device. Make
      the same happen for IPv4 by adding the skb_iif to inet_skb_parm and set
      it in ipv4 code after clearing the skb control buffer similar to IPv6.
      From there the pktinfo can just pull it from cb with the PKTINFO_SKB_CB
      cast.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3f1010b
    • David Ahern's avatar
      net: original ingress device index in PKTINFO · 0b922b7a
      David Ahern authored
      Applications such as OSPF and BFD need the original ingress device not
      the VRF device; the latter can be derived from the former. To that end
      add the skb_iif to inet_skb_parm and set it in ipv4 code after clearing
      the skb control buffer similar to IPv6. From there the pktinfo can just
      pull it from cb with the PKTINFO_SKB_CB cast.
      
      The previous patch moving the skb->dev change to L3 means nothing else
      is needed for IPv6; it just works.
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b922b7a
    • David Ahern's avatar
      net: l3mdev: Add hook in ip and ipv6 · 74b20582
      David Ahern authored
      Currently the VRF driver uses the rx_handler to switch the skb device
      to the VRF device. Switching the dev prior to the ip / ipv6 layer
      means the VRF driver has to duplicate IP/IPv6 processing which adds
      overhead and makes features such as retaining the ingress device index
      more complicated than necessary.
      
      This patch moves the hook to the L3 layer just after the first NF_HOOK
      for PRE_ROUTING. This location makes exposing the original ingress device
      trivial (next patch) and allows adding other NF_HOOKs to the VRF driver
      in the future.
      
      dev_queue_xmit_nit is exported so that the VRF driver can cycle the skb
      with the switched device through the packet taps to maintain current
      behavior (tcpdump can be used on either the vrf device or the enslaved
      devices).
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74b20582
    • Nicolas Dichtel's avatar
      ipv6: fix 4in6 tunnel receive path · ca4aa976
      Nicolas Dichtel authored
      Protocol for 4in6 tunnel is IPPROTO_IPIP. This was wrongly changed by
      the last cleanup.
      
      CC: Tom Herbert <tom@herbertland.com>
      Fixes: 0d3c703a ("ipv6: Cleanup IPv6 tunnel receive path")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca4aa976
    • Lawrence Brakmo's avatar
      tcp: replace cnt & rtt with struct in pkts_acked() · 756ee172
      Lawrence Brakmo authored
      Replace 2 arguments (cnt and rtt) in the congestion control modules'
      pkts_acked() function with a struct. This will allow adding more
      information without having to modify existing congestion control
      modules (tcp_nv in particular needs bytes in flight when packet
      was sent).
      
      As proposed by Neal Cardwell in his comments to the tcp_nv patch.
      Signed-off-by: default avatarLawrence Brakmo <brakmo@fb.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      756ee172
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · cf88585b
      David S. Miller authored
      Antonio Quartulli says:
      
      ====================
      Included changes:
      - remove useless skb size check in batadv_interface_rx
      - basic netns support introduced by Andrew Lunn:
          - prevent virtual interface from changing netns by setting
            NETIF_F_NETNS_LOCAL
          - create virtual interface within the netns of the first
            hard-interface
      - introduce detection of complex bridge loops and report event
        to the user (via udev) when the Bridge Loop Avoidance mechanism
        can't prevent them
      - minor reference counting bugfixes for the hard_iface object that
        couldn't make it via the net tree
      - use kref_get() instead of kref_get_unless_zero() to make reference
        counting bug more visible
      - use batadv_compare_eth() all over the code when possible instead of
        plain memcmp()
      - minor code cleanup and style adjustments
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf88585b
  2. 10 May, 2016 34 commits