1. 17 Mar, 2011 4 commits
    • Joy Latten's avatar
      xfrm security context support · 4bb75da2
      Joy Latten authored
      Adds security context support to ip xfrm state.
      Signed-off-by: default avatarJoy Latten <latten@austin.ibm.com>
      4bb75da2
    • Joy Latten's avatar
      xfrm security context support · e5055b59
      Joy Latten authored
      Adds security context support to ip xfrm policy.
      Signed-off-by: default avatarJoy Latten <latten@austin.ibm.com>
      e5055b59
    • Joy Latten's avatar
      xfrm security context support · 2c319e1a
      Joy Latten authored
      In the Linux kernel, ipsec policy and SAs can include a
      security context to support MAC networking. This feature
      is often referred to as "labeled ipsec".
      
      This patchset adds security context support into ip xfrm
      such that a security context can be included when
      add/delete/display SAs and policies with the ip command.
      The user provides the security context when adding
      SAs and policies. If a policy or SA contains a security
      context, the changes allow the security context to be displayed.
      
      For example,
      ip xfrm state
      src 10.1.1.6 dst 10.1.1.2
      	proto esp spi 0x00000301 reqid 0 mode transport
      	replay-window 0
      	auth hmac(digest_null) 0x3078
      	enc cbc(des3_ede) 0x6970763672656164796c6f676f33646573636263696e3031
      	security context root:system_r:unconfined_t:s0
      
      Please  let me know if all is ok with the patchset.
      Thanks!!
      
      regards,
      Joy
      Signed-off-by: default avatarJoy Latten <latten@austin.ibm.com>
      2c319e1a
    • Sridhar Samudrala's avatar
      macvlan/macvtap: support 'passthru' mode · f0612d56
      Sridhar Samudrala authored
      Add support for 'passthru' mode when creating a macvlan/macvtap device
      which allows takeover of the underlying device and passing it to a KVM
      guest using virtio with macvtap backend.
      
      Only one macvlan device is allowed in passthru mode and it inherits
      the mac address from the underlying device and sets it in promiscuous
      mode to receive and forward all the packets.
      Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
      f0612d56
  2. 16 Mar, 2011 1 commit
  3. 13 Jan, 2011 3 commits
    • Stephen Hemminger's avatar
      Revert "iproute2: add VF_PORT support" · 1598b9ef
      Stephen Hemminger authored
      This reverts commit 632110aa.
      
      There seem to be some recent changes in the 802.1Qbh/bg specs which may
      result in changes to this patch in the near future. It seems like its best
      to ignore this patch for now.
      I will re-spin at a later time when the changes in the specs converge.
      
      BTW, Please let me know if I should CC netdev list and others on the
      original email. I can resend this email.
      
      Thanks,
      Roopa
      1598b9ef
    • Roopa Prabhu's avatar
      iproute2: add VF_PORT support · 632110aa
      Roopa Prabhu authored
      Resubmitting Scott Feldmans original patch with below changes
      
      - Fix port profile strlen which was off by 1
      - Added function to convert IFLA_PORT_RESPONSE codes to string
      
      Add support for IFLA_VF_PORTS.  VF port netlink msg layout is
      
              [IFLA_NUM_VF]
              [IFLA_VF_PORTS]
                      [IFLA_VF_PORT]
                              [IFLA_PORT_*], ...
                      [IFLA_VF_PORT]
                              [IFLA_PORT_*], ...
                      ...
              [IFLA_PORT_SELF]
                      [IFLA_PORT_*], ...
      
      The iproute2 cmd line for link set is now:
      
      Usage: ip link add link DEV [ name ] NAME
                         [ txqueuelen PACKETS ]
                         [ address LLADDR ]
                         [ broadcast LLADDR ]
                         [ mtu MTU ]
                         type TYPE [ ARGS ]
             ip link delete DEV type TYPE [ ARGS ]
      
             ip link set DEVICE [ { up | down } ]
                                [ arp { on | off } ]
                                [ dynamic { on | off } ]
                                [ multicast { on | off } ]
                                [ allmulticast { on | off } ]
                                [ promisc { on | off } ]
                                [ trailers { on | off } ]
                                [ txqueuelen PACKETS ]
                                [ name NEWNAME ]
                                [ address LLADDR ]
                                [ broadcast LLADDR ]
                                [ mtu MTU ]
                                [ netns PID ]
                                [ alias NAME ]
                                [ port MODE { PROFILE | VSI } ]
                                [ vf NUM [ mac LLADDR ]
                                         [ vlan VLANID [ qos VLAN-QOS ] ]
                                         [ rate TXRATE ]
                                         [ port MODE { PROFILE | VSI } ] ]
             ip link show [ DEVICE ]
      
      TYPE := { vlan | veth | vcan | dummy | ifb | macvlan | can }
      MODE := { assoc | preassoc | preassocrr | disassoc }
      PROFILE := profile PROFILE
                 [ instance UUID ]
                 [ host UUID ]
      VSI := vsi mgr MGRID type VTID ver VER
             [ instance UUID ]
      Signed-off-by: default avatarScott Feldman <scofeldm@cisco.com>
      Signed-off-by: default avatarRoopa Prabhu <roprabhu@cisco.com>
      632110aa
    • Stephen Hemminger's avatar
      Update to lasest kernel headers · 9351fec7
      Stephen Hemminger authored
      9351fec7
  4. 07 Jan, 2011 1 commit
  5. 29 Dec, 2010 1 commit
  6. 16 Dec, 2010 1 commit
  7. 10 Dec, 2010 3 commits
  8. 09 Dec, 2010 1 commit
  9. 08 Dec, 2010 1 commit
  10. 01 Dec, 2010 3 commits
    • Dan Smith's avatar
      Add ip route save/restore · f4ff11e3
      Dan Smith authored
      This patch adds save and restore commands to "ip route". Save dumps
      the RTNL stream to stdout which can then be passed to restore later.
      This may be helpful in some normal situations, and will allow C/R to
      migrate the routing information in userspace.  Tweaking of the stream
      can be done by userspace helpers to convert between versions and adjust
      things like device indexes when restoring routes in a different
      environment.
      
      By factoring out some of the common bits of print_route() into
      filter_nlmsg(), the "save" command can use the same selection logic
      as "list," allowing the caller to save only specific routes as
      necessary.
      
      The only change since the RFC is the addition of manpage and doc
      material.
      Signed-off-by: default avatarDan Smith <danms@us.ibm.com>
      f4ff11e3
    • Gregoire Baron's avatar
      tc: add ACT_CSUM action support (csum) · 3822cc98
      Gregoire Baron authored
      Add the iproute2 support for the ACT_CSUM action. Can be used as
      following, certainly in conjunction with the ACT_PEDIT action (pedit):
      
       # In order to DNAT (stateless) IPv4 packet from 192.168.1.100 to
       #  0x12345678 (18.52.86.120), and update the IPv4 header checksum and
       #  the UDP checksum (the last one, only if the packet is UDP).
      tc filter add eth0 prio 1 protocol ip parent ffff: \
        u32 match ip src 192.168.1.100/32 flowid :1 \
          action pedit munge offset 16 u32 set 0x12345678 \
            pipe csum ip and udp
      
       # In order to alter destination address of IPv6 TCP packets from fc00::1
       #  and correct the TCP checksum (nothing happened? except maybe for
       #  checksums in the TCP payload ...).
      tc filter add eth0 prio 1 protocol ipv6 parent ffff: \
        u32 match ip6 src fc00::1/128 match ip6 protocol 0x06 0xff flowid :1 \
          action pedit munge offset 24 u32 set 0x12345678 \
            pipe csum tcp
      3822cc98
    • Ben Greear's avatar
      Allow 'ip addr flush' to loop more than 10 times · 64c79560
      Ben Greear authored
      The default remains at 10 for backwards compatibility.
      
      For instance:
       # ip addr flush dev eth2
       *** Flush remains incomplete after 10 rounds. ***
       # ip -l 20 addr flush dev eth2
       *** Flush remains incomplete after 20 rounds. ***
       # ip -loops 0 addr flush dev eth2
       #
      
      This is useful for getting rid of large numbers of IP
      addresses in scripts.
      Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
      64c79560
  11. 30 Nov, 2010 6 commits
  12. 29 Nov, 2010 1 commit
  13. 28 Nov, 2010 1 commit
  14. 18 Nov, 2010 1 commit
  15. 21 Oct, 2010 1 commit
  16. 13 Sep, 2010 1 commit
  17. 25 Aug, 2010 1 commit
    • Stephen Hemminger's avatar
      Fix GRED options clearing · cb4bd0ec
      Stephen Hemminger authored
      Bug reported where priorities of GRED DP's are ignored.
      The option parsing sets opt then memset was clearing these
      values.
      cb4bd0ec
  18. 23 Aug, 2010 7 commits
    • Eric Dumazet's avatar
      iproute2: add 64bit support to ifstat · a571587d
      Eric Dumazet authored
      Le lundi 23 août 2010 à 10:33 -0700, Stephen Hemminger a écrit :
      
      > I think this breaks the wraparound detection code in this command.
      >
      >
      
      OK lets fix the bug only, before adding 64bit counters capabilities.
      
      Thanks
      
      [PATCH] iproute2: add 64bit arches support to ifstat
      
      ifstat assumes IFLA_STATS fields are "unsigned long", but they are
      __u32. This fix is needed to let ifstat run on 64bit arches.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      a571587d
    • Stephen Hemminger's avatar
      Use correct rt_link_statistics · daf7bd5c
      Stephen Hemminger authored
      In recent kernels, net_device_stats is not exposed and the code
      shoulf have used rt_link_statistics.  Also, fix use of sprintf
      with user supplied value.
      daf7bd5c
    • Eric Dumazet's avatar
      ip: add RTA_MARK support · b0373bfb
      Eric Dumazet authored
      Adds support for RTA_MARK rt attribute added in linux-2.6.36
      
      $ ip route get ADDR mark 4
      192.168.20.110 dev eth1  src 192.168.20.108  mark 4
          cache  mtu 1500 advmss 1460 hoplimit 64
      
      $ ip route get 192.168.20.108 from ADDR iif STRING mark 256
      local 192.168.20.108 from 192.168.20.110 dev lo  src 192.168.20.108  mark 0x100
          cache <local,src-direct>  iif eth1
      
      $ ip route list cache [ADDR] mark NUMBER
      
      Hexadecimal output if mark >= 16
      null marks are not displayed.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      b0373bfb
    • Stephen Hemminger's avatar
      Update kernel headers to 2.6.36-rc2 · 04a9fc0a
      Stephen Hemminger authored
      04a9fc0a
    • Stephen Hemminger's avatar
      Snapshot for 2.6.35.1 · daa10c8a
      Stephen Hemminger authored
      daa10c8a
    • Ulrich Weber's avatar
      iproute2: dont filter cached routes on iproute_get · c73f3e02
      Ulrich Weber authored
      iproute_get will return cloned routes for IPv4
      and cloned as well non-cloned routes for IPv6.
      
      Therefore RTM_F_CLONED flag should not be checked
      for iproute_get routes. Check in print_route will
      always fail because valid values are 0 and 1.
      Signed-off-by: default avatarUlrich Weber <uweber@astaro.com>
      c73f3e02
    • Ben Greear's avatar
      iproute2: Fix filtering related to flushing IP addresses. · 3bc1c4f2
      Ben Greear authored
      The old 'ip addr flush' logic had several flaws:
      
      * It reversed logic for primary v/s secondary flags
        (though, it sort of worked right anyway)
      
      * The code tried to remove secondaries and then primaries,
        but in practice, it always removed one primary per loop,
        which not at all efficient.
      
      * The filter logic in the core would run only the first
        filter in most cases.
      
      * If you used '-s -s', the ifa_flags member would be
        modified, which could make future filters fail
        to function fine.
      
      This patch attempts to fix all of these issues.
      Tested-by: default avatarBrian Haley <brian.haley@hp.com>
      Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
      3bc1c4f2
  19. 04 Aug, 2010 1 commit
  20. 02 Aug, 2010 1 commit