Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next] tcp: add ability to set a timestamp offset
From: David Miller @ 2013-02-13 18:22 UTC (permalink / raw)
  To: avagin
  Cc: netdev, criu, linux-kernel, kuznet, jmorris, yoshfuji, kaber,
	edumazet, xemul
In-Reply-To: <1360597819-23783-1-git-send-email-avagin@openvz.org>

From: Andrey Vagin <avagin@openvz.org>
Date: Mon, 11 Feb 2013 19:50:16 +0400

> If a TCP socket will get live-migrated from one box to another the
> timestamps (which are typically ON) will get screwed up -- the new
> kernel will generate TS values that has nothing to do with what they
> were on dump. The solution is to yet again fix the kernel and put a
> "timestamp offset" on a socket.
> 
> A socket offset is added in places where externally visible tcp
> timestamp option is parsed/initialized.
> 
> Connections in the SYN_RECV state are not supported, global
> tcp_time_stamp is used for them, because repair mode doesn't support
> this state. In a future it can be implemented by the similar way as for
> TIME_WAIT sockets.
> 
> For time-wait sockets offset is inhereted by a proper tcp_sock.
> 
> A per-socket offset can be set only for sockets in repair mode.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH v4 4/9] rdma/cm: Update port reservation to support AF_IB
From: Jason Gunthorpe @ 2013-02-13 18:26 UTC (permalink / raw)
  To: Hefty, Sean
  Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <1828884A29C6694DAF28B7E6B8A8237368B9A432-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Wed, Feb 13, 2013 at 06:19:51PM +0000, Hefty, Sean wrote:
> > Sean, I've lost track of all this over time, but just to check in,
> > with this new interface, would it be possible to obsolete ib_ucm? That
> > seems desirable to me, as it is so flawed..
> 
> I'd love to obsolete ib_ucm.  This interface should make it
> possible, though some additional implementation would be needed
> (e.g. for automatic path migration).

Okay - but there are some nice gaps in the API to cleanly place such
things in future?

A long time ago we discussed having different paths for CM GMP,
inbound data and outbound data (ie the full IB asymetric pathing
model), did that get included in the API as well?

> I have an immediate need to connect using native IB addresses.  So
> without this, I'll be forced to use ib_ucm or roll a new user space
> CM.

Using ucm is alot of trouble. Many sites don't have it setup properly,
don't have proper device node permissions and the issue with unique
IDs ends up being critical..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] net: Fix possible wrong checksum generation.
From: David Miller @ 2013-02-13 18:31 UTC (permalink / raw)
  To: pshelar; +Cc: edumazet, netdev, jesse, bhutchings
In-Reply-To: <1360610861-1753-1-git-send-email-pshelar@nicira.com>

From: Pravin B Shelar <pshelar@nicira.com>
Date: Mon, 11 Feb 2013 11:27:41 -0800

> Patch cef401de7be8c4e (net: fix possible wrong checksum
> generation) fixed wrong checksum calculation but it broke TSO by
> defining new GSO type but not a netdev feature for that type.
> net_gso_ok() would not allow hardware checksum/segmentation
> offload of such packets without the feature.
> 
> Following patch fixes TSO and wrong checksum. This patch uses
> same logic that Eric Dumazet used. Patch introduces new flag
> SKBTX_SHARED_FRAG if at least one frag can be modified by
> the user. but SKBTX_SHARED_FRAG flag is kept in skb shared
> info tx_flags rather than gso_type.
> 
> tx_flags is better compared to gso_type since we can have skb with
> shared frag without gso packet. It does not link SHARED_FRAG to
> GSO, So there is no need to define netdev feature for this.
> 
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] atl1c: add error checking for pci_map_single functions
From: David Miller @ 2013-02-13 18:33 UTC (permalink / raw)
  To: xiong; +Cc: netdev, linux-kernel, qca-linux-team, nic-devel, jwboyer
In-Reply-To: <1360629880-9920-1-git-send-email-xiong@qca.qualcomm.com>

From: xiong <xiong@qca.qualcomm.com>
Date: Tue, 12 Feb 2013 08:44:40 +0800

> it is reported that code hit DMA-API errors on 3.8-rc6+,
> (see https://bugzilla.redhat.com/show_bug.cgi?id=908436, and
>      https://bugzilla.redhat.com/show_bug.cgi?id=908550)
> 
> this patch just adds error handler for
>     pci_map_single and skb_frag_dma_map.
> 
> Signed-off-by: xiong <xiong@qca.qualcomm.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] net/macb: fix race with RX interrupt while doing NAPI
From: David Miller @ 2013-02-13 18:36 UTC (permalink / raw)
  To: nicolas.ferre
  Cc: netdev, linux-arm-kernel, linux-kernel, plagnioj, mailinglists
In-Reply-To: <1360663728-10296-1-git-send-email-nicolas.ferre@atmel.com>

From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Tue, 12 Feb 2013 11:08:48 +0100

> When interrupts are disabled, an RX condition can occur but
> it is not reported when enabling interrupts again. We need to check
> RSR and use napi_reschedule() if condition is met.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Applied.

^ permalink raw reply

* Re: [PATCH] batman-adv: Fix NULL pointer dereference in DAT hash collision avoidance
From: David Miller @ 2013-02-13 18:36 UTC (permalink / raw)
  To: paukoning; +Cc: netdev
In-Reply-To: <1360664325-7323-1-git-send-email-paukoning@gmail.com>

From: Pau Koning <paukoning@gmail.com>
Date: Tue, 12 Feb 2013 11:18:45 +0100

> An entry in DAT with the hashed position of 0 can cause a NULL pointer
> dereference when the first entry is checked by batadv_choose_next_candidate.
> This first candidate automatically has the max value of 0 and the max_orig_node
> of NULL. Not checking max_orig_node for NULL in batadv_is_orig_node_eligible
> will lead to a NULL pointer dereference when checking for the lowest address.
> 
> This problem was added in 785ea1144182c341b8b85b0f8180291839d176a8
> ("batman-adv: Distributed ARP Table - create DHT helper functions").
> 
> Signed-off-by: Pau Koning <paukoning@gmail.com>

Applied.

^ permalink raw reply

* RE: [PATCH v4 4/9] rdma/cm: Update port reservation to support AF_IB
From: Hefty, Sean @ 2013-02-13 18:37 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Or Gerlitz, linux-rdma@vger.kernel.org, netdev@vger.kernel.org
In-Reply-To: <20130213182612.GA11812@obsidianresearch.com>

> A long time ago we discussed having different paths for CM GMP,
> inbound data and outbound data (ie the full IB asymetric pathing
> model), did that get included in the API as well?

Yes - this support made it upstream.

^ permalink raw reply

* Re: [PATCH] net: ethernet: ti: remove redundant NULL check.
From: David Miller @ 2013-02-13 18:41 UTC (permalink / raw)
  To: tipecaml
  Cc: linux-kernel, kernel-janitors, mugunthanvnm, zonque, hotforest,
	Julia.Lawall, netdev
In-Reply-To: <1360709550-821-1-git-send-email-tipecaml@gmail.com>

From: Cyril Roelandt <tipecaml@gmail.com>
Date: Tue, 12 Feb 2013 23:52:30 +0100

> cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
> cpdma_ctlr_destroy() can safely be removed.
> 
> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] net: sctp: sctp_v6_get_dst: fix boolean test in dst cache
From: David Miller @ 2013-02-13 18:42 UTC (permalink / raw)
  To: dborkman; +Cc: linux-sctp, netdev
In-Reply-To: <4a07201201d7bac08468d17dea3dbc1ea9a67205.1360709645.git.dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 13 Feb 2013 00:30:16 +0100

> We walk through the bind address list and try to get the best source
> address for a given destination. However, currently, we take the
> 'continue' path of the loop when an entry is invalid (!laddr->valid)
> *and* the entry state does not equal SCTP_ADDR_SRC (laddr->state !=
> SCTP_ADDR_SRC).
> 
> Thus, still, invalid entries with SCTP_ADDR_SRC might not 'continue'
> as well as valid entries with SCTP_ADDR_{NEW, SRC, DEL}, with a possible
> false baddr and matchlen as a result, causing in worst case dst route
> to be false or possibly NULL.
> 
> This test should actually be a '||' instead of '&&'. But lets fix it
> and make this a bit easier to read by having the condition the same way
> as similarly done in sctp_v4_get_dst.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] be2net: remove BUG_ON() in be_mcc_compl_is_new()
From: David Miller @ 2013-02-13 18:53 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev
In-Reply-To: <df52a8ca-fbd1-41aa-ad6f-995fd724a4d4@CMEXHTCAS1.ad.emulex.com>

From: Sathya Perla <sathya.perla@emulex.com>
Date: Wed, 13 Feb 2013 14:35:19 +0530

> The current code expects that the last word (with valid bit)
> of an MCC compl is DMAed in one shot. This may not be the case.
> Remove this assertion.
> 
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>

Applied.

^ permalink raw reply

* Re: [PATCH] bgmac: return error on failed PHY write
From: David Miller @ 2013-02-13 18:58 UTC (permalink / raw)
  To: zajec5; +Cc: netdev
In-Reply-To: <1360746891-15124-1-git-send-email-zajec5@gmail.com>

From: Rafał Miłecki <zajec5@gmail.com>
Date: Wed, 13 Feb 2013 10:14:51 +0100

> Some callers may want to know if PHY write succeed. Also make PHY
> functions static, they are not exported anywhere.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next 1/2] net: sctp: minor: make jsctp_sf_eat_sack static
From: David Miller @ 2013-02-13 19:04 UTC (permalink / raw)
  To: dborkman; +Cc: linux-sctp, netdev
In-Reply-To: <7eef4b701794c1bb78819bc6e6c45bf99b49801d.1360752304.git.dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 13 Feb 2013 12:03:49 +0100

> The function jsctp_sf_eat_sack can be made static, no need to extend
> its visibility.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

It's exported for the jprobe lookup by ->symbol_name

Did you test this?

^ permalink raw reply

* Re: [PATCH net-next 1/2] net: sctp: minor: make jsctp_sf_eat_sack static
From: David Miller @ 2013-02-13 19:06 UTC (permalink / raw)
  To: dborkman; +Cc: linux-sctp, netdev
In-Reply-To: <20130213.140436.521031425285650154.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 13 Feb 2013 14:04:36 -0500 (EST)

> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Wed, 13 Feb 2013 12:03:49 +0100
> 
>> The function jsctp_sf_eat_sack can be made static, no need to extend
>> its visibility.
>> 
>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> 
> It's exported for the jprobe lookup by ->symbol_name
> 
> Did you test this?

Never mind, I mis-read this, the symbol name is for the routine being
shadowed by the jprobe, which is exported.

These two patches look fine and I'll apply them, thanks Daniel.

^ permalink raw reply

* Re: [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
From: David Miller @ 2013-02-13 19:08 UTC (permalink / raw)
  To: vyasevic; +Cc: netdev, shemminger, bridge
In-Reply-To: <1360777309-25522-1-git-send-email-vyasevic@redhat.com>

From: Vlad Yasevich <vyasevic@redhat.com>
Date: Wed, 13 Feb 2013 12:41:37 -0500

> Changes since v9:
> * series re-ordering so make functionality more distinct.  Basic vlan
>   filtering is patches 1-4.  Support for PVID/untagged vlans is patches
>   5 and 6.  VLAN support for FDB/MDB is patches 7-11.  Patch 12 is
>   still additional egress policy.
> * Slight simplification to code that extracts the VID from skb.  Since we
>   now depend on the vlan module, at the time of input skb_tci is guaranteed
>   to be set if the packet had 8021q header.  We can simply refere to it.
> * Changed the opaque 'parent' pointer from prior patches to a union so we
>   can be much more explicit in our assignments.
> * Lots of additional testing with STP turned on.  No issues were observed.

Thanks a lot for keeping this series uptodate Vlad.

Stephen, I think this series is ready, anything needed to be fixed still
can be follow-on patches.  Agreed?

Thanks.

^ permalink raw reply

* Re: [PATCH net-next 1/2] net: sctp: minor: make jsctp_sf_eat_sack static
From: Daniel Borkmann @ 2013-02-13 19:14 UTC (permalink / raw)
  To: David Miller; +Cc: linux-sctp, netdev
In-Reply-To: <20130213.140607.144614341798606281.davem@davemloft.net>

On 02/13/2013 08:06 PM, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 13 Feb 2013 14:04:36 -0500 (EST)
>
>> From: Daniel Borkmann <dborkman@redhat.com>
>> Date: Wed, 13 Feb 2013 12:03:49 +0100
>>
>>> The function jsctp_sf_eat_sack can be made static, no need to extend
>>> its visibility.
>>>
>>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>>
>> It's exported for the jprobe lookup by ->symbol_name
>>
>> Did you test this?
>
> Never mind, I mis-read this, the symbol name is for the routine being
> shadowed by the jprobe, which is exported.
>
> These two patches look fine and I'll apply them, thanks Daniel.

Thanks Dave, yes, I did a test doing cat on /proc/net/sctpprobe
while running a simple SCTP client / server.

^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2013-02-13 19:21 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


This is primarily to get those r8169 reverts sorted, but other
fixes have accumulated meanwhile.

1) Revert two r8169 changes to fix suspend/resume for some users,
   from Francois Romieu.

2) PCI dma mapping errors in atl1c are not checked for and this cause
   hard crashes for some users, from Xiong Huang.

3) In 3.8.x we merged the removal of the EXPERIMENTAL dependency for
   'dlm' but the same patch for 'sctp' got lost somewhere, resulting
   in the potential for build errors since there are cross dependencies.
   From Kees Cook.

4) SCTP's ipv6 socket route validation makes boolean tests incorrectly,
   fix from Daniel Borkmann.

5) mac80211 does sizeof(ptr) instead of (sizeof(ptr) * nelem), from Cong
   Ding.

6) arp_rcv() can crash on shared non-linear packets, from Eric Dumazet.

7) Avoid crashes in macvtap by setting ->gso_type consistently in ixgbe,
   qlcnic, and bnx2x drivers.  From Michael S. Tsirkin and Alexander Duyck.

8) Trinity fuzzer spots infinite loop in __skb_recv_datagram(), fix from
   Eric Dumazet.

9) STP protocol frames should use high packet priority, otherwise an
   overloaded bridge can get stuck.  From Stephen Hemminger.

10) The HTB packet scheduler was converted some time ago to store
    internal timestamps in nanoseconds, but we don't convert back into
    psched ticks for the user during dumps.  Fix from Jiri Pirko.

11) mwl8k channel table doesn't set the .band field properly, resulting
    in NULL pointer derefs.  Fix from Jonas Gorski.

12) mac80211 doesn't accumulate channels properly during a scan so we
    can downgrade heavily to a much less desirable connection speed.
    Fix from Johannes Berg.

13) PHY probe failure in stmmac can result in resource leaks and
    double MDIO registery later, from Giuseppe CAVALLARO.

14) Correct ipv6 checksumming in ip6t_NPT netfilter module, also fix
    address prefix mangling, from YOSHIFUJI Hideaki.

Please pull, thanks a lot!

The following changes since commit 836dc9e3fbbab0c30aa6e664417225f5c1fb1c39:

  Linux 3.8-rc7 (2013-02-09 08:20:39 +1100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master

for you to fetch changes up to 3bdb1a443a53a4058b95c8a67c856cc8b8393411:

  net, sctp: remove CONFIG_EXPERIMENTAL (2013-02-13 13:57:27 -0500)

----------------------------------------------------------------
Alexander Duyck (1):
      ixgbe: Only set gso_type to SKB_GSO_TCPV4 as RSC does not support IPv6

Bjørn Mork (1):
      net: qmi_wwan: add Yota / Megafon M100-1 4g modem

Cong Ding (1):
      mac80211: fix error in sizeof() usage

Dan Carpenter (1):
      ipvs: freeing uninitialized pointer on error

Daniel Borkmann (2):
      ipvs: sctp: fix checksumming on snat and dnat handlers
      net: sctp: sctp_v6_get_dst: fix boolean test in dst cache

David S. Miller (4):
      Merge branch 'davem.r8169' of git://violet.fr.zoreil.com/romieu/linux
      Merge branch 'gso_type'
      Merge branch 'master' of git://1984.lsi.us.es/nf
      Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless

Eric Dumazet (2):
      arp: fix possible crash in arp_rcv()
      net: fix infinite loop in __skb_recv_datagram()

Francois Romieu (2):
      Revert "r8169: enable ALDPS for power saving".
      Revert "r8169: enable internal ASPM and clock request settings".

Giuseppe CAVALLARO (2):
      stmmac: fix macro used for debugging the xmit
      stmmac: mdio register has to fail if the phy is not found

Huang, Xiong (1):
      atl1c: add error checking for pci_map_single functions

Jiri Pirko (1):
      htb: fix values in opt dump

Johannes Berg (2):
      mac80211: fix managed mode channel context use
      mac80211: fix channel selection bug

John W. Linville (2):
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem

Jonas Gorski (1):
      mwl8k: fix band for supported channels

Kees Cook (1):
      net, sctp: remove CONFIG_EXPERIMENTAL

Michael S. Tsirkin (3):
      ixgbe: fix gso type
      qlcnic: set gso_type
      bnx2x: set gso_type

Nicolas Ferre (1):
      net/macb: fix race with RX interrupt while doing NAPI

Pau Koning (1):
      batman-adv: Fix NULL pointer dereference in DAT hash collision avoidance

Stephen Hemminger (1):
      bridge: set priority of STP packets

YOSHIFUJI Hideaki / 吉藤英明 (3):
      netfilter: ip6t_NPT: Fix adjustment calculation
      netfilter: ip6t_NPT: Fix prefix mangling
      netfilter: ip6t_NPT: Ensure to check lower part of prefixes are zero

 drivers/net/ethernet/atheros/atl1c/atl1c_main.c   | 71 +++++++++++++++++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c   | 12 ++--
 drivers/net/ethernet/cadence/macb.c               |  5 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c     |  1 +
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c    |  7 +-
 drivers/net/ethernet/realtek/r8169.c              | 86 +++++------------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |  2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 10 ++-
 drivers/net/usb/qmi_wwan.c                        |  1 +
 drivers/net/wireless/mwl8k.c                      | 36 +++++-----
 net/batman-adv/distributed-arp-table.c            |  2 +-
 net/bridge/br_stp_bpdu.c                          |  2 +
 net/core/datagram.c                               |  2 +-
 net/ipv4/arp.c                                    | 21 +++---
 net/ipv6/netfilter/ip6t_NPT.c                     | 18 +++--
 net/mac80211/cfg.c                                |  3 +-
 net/mac80211/mlme.c                               | 11 +--
 net/netfilter/ipvs/ip_vs_proto_sctp.c             | 35 +++++----
 net/netfilter/ipvs/ip_vs_sync.c                   |  2 +
 net/sched/sch_htb.c                               |  4 +-
 net/sctp/Kconfig                                  |  4 +-
 net/sctp/ipv6.c                                   |  5 +-
 22 files changed, 191 insertions(+), 149 deletions(-)

^ permalink raw reply

* Re: [PATCH v10 net-next 10/12] bridge: Add vlan support to static neighbors
From: Greg Rose @ 2013-02-13 19:25 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: netdev, bridge, shemminger, davem, mirqus
In-Reply-To: <1360777309-25522-11-git-send-email-vyasevic@redhat.com>

On Wed, 13 Feb 2013 12:41:47 -0500
Vlad Yasevich <vyasevic@redhat.com> wrote:

> When a user adds bridge neighbors, allow him to specify VLAN id.
> If the VLAN id is not specified, the neighbor will be added
> for VLANs currently in the ports filter list.  If no VLANs are
> configured on the port, we use vlan 0 and only add 1 entry.
> 
> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
>  drivers/net/macvlan.c                         |    2 +-
>  drivers/net/vxlan.c                           |    3 +-
>  include/linux/netdevice.h                     |    1 +
>  include/uapi/linux/neighbour.h                |    1 +
>  net/bridge/br_fdb.c                           |  148
> ++++++++++++++++++++++---
> net/bridge/br_private.h                       |    6 +-
> net/core/rtnetlink.c                          |   23 +++-- 8 files
> changed, 154 insertions(+), 32 deletions(-)

You (or someone) needs to fix up the ndo_fdb_del functions for the
mellanox and qlogic drivers also since that also instantiate those
operations.

I look forward to having this feature set.  Quite useful.

Thanks,

- Greg Rose
Networking Division
Intel Corp.

> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index
> eecd9cb..c1394dd 100644 ---
> a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7001,7 +7001,7 @@
> static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
> return err; }
>  
> -static int ixgbe_ndo_fdb_del(struct ndmsg *ndm,
> +static int ixgbe_ndo_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
>  			     struct net_device *dev,
>  			     const unsigned char *addr)
>  {
> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
> index 7b44ebd..afbea93 100644
> --- a/drivers/net/macvlan.c
> +++ b/drivers/net/macvlan.c
> @@ -564,7 +564,7 @@ static int macvlan_fdb_add(struct ndmsg *ndm,
> struct nlattr *tb[], return err;
>  }
>  
> -static int macvlan_fdb_del(struct ndmsg *ndm,
> +static int macvlan_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
>  			   struct net_device *dev,
>  			   const unsigned char *addr)
>  {
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 72485b9..9d70421 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -393,7 +393,8 @@ static int vxlan_fdb_add(struct ndmsg *ndm,
> struct nlattr *tb[], }
>  
>  /* Delete entry (via netlink) */
> -static int vxlan_fdb_delete(struct ndmsg *ndm, struct net_device
> *dev, +static int vxlan_fdb_delete(struct ndmsg *ndm, struct nlattr
> *tb[],
> +			    struct net_device *dev,
>  			    const unsigned char *addr)
>  {
>  	struct vxlan_dev *vxlan = netdev_priv(dev);
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index bf3db11..6eb70eb 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1008,6 +1008,7 @@ struct net_device_ops {
>  					       const unsigned char
> *addr, u16 flags);
>  	int			(*ndo_fdb_del)(struct ndmsg *ndm,
> +					       struct nlattr *tb[],
>  					       struct net_device
> *dev, const unsigned char *addr);
>  	int			(*ndo_fdb_dump)(struct sk_buff
> *skb, diff --git a/include/uapi/linux/neighbour.h
> b/include/uapi/linux/neighbour.h index 275e5d6..adb068c 100644
> --- a/include/uapi/linux/neighbour.h
> +++ b/include/uapi/linux/neighbour.h
> @@ -20,6 +20,7 @@ enum {
>  	NDA_LLADDR,
>  	NDA_CACHEINFO,
>  	NDA_PROBES,
> +	NDA_VLAN,
>  	__NDA_MAX
>  };
>  
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index 276a522..4b75ad4 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -505,6 +505,10 @@ static int fdb_fill_info(struct sk_buff *skb,
> const struct net_bridge *br, ci.ndm_refcnt	 = 0;
>  	if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
>  		goto nla_put_failure;
> +
> +	if (nla_put(skb, NDA_VLAN, sizeof(u16), &fdb->vlan_id))
> +		goto nla_put_failure;
> +
>  	return nlmsg_end(skb, nlh);
>  
>  nla_put_failure:
> @@ -516,6 +520,7 @@ static inline size_t fdb_nlmsg_size(void)
>  {
>  	return NLMSG_ALIGN(sizeof(struct ndmsg))
>  		+ nla_total_size(ETH_ALEN) /* NDA_LLADDR */
> +		+ nla_total_size(sizeof(u16)) /* NDA_VLAN */
>  		+ nla_total_size(sizeof(struct nda_cacheinfo));
>  }
>  
> @@ -617,6 +622,25 @@ static int fdb_add_entry(struct net_bridge_port
> *source, const __u8 *addr, return 0;
>  }
>  
> +static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge_port *p,
> +	       const unsigned char *addr, u16 nlh_flags, u16 vid)
> +{
> +	int err = 0;
> +
> +	if (ndm->ndm_flags & NTF_USE) {
> +		rcu_read_lock();
> +		br_fdb_update(p->br, p, addr, vid);
> +		rcu_read_unlock();
> +	} else {
> +		spin_lock_bh(&p->br->hash_lock);
> +		err = fdb_add_entry(p, addr, ndm->ndm_state,
> +				    nlh_flags, vid);
> +		spin_unlock_bh(&p->br->hash_lock);
> +	}
> +
> +	return err;
> +}
> +
>  /* Add new permanent fdb entry with RTM_NEWNEIGH */
>  int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
>  	       struct net_device *dev,
> @@ -624,12 +648,29 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr
> *tb[], {
>  	struct net_bridge_port *p;
>  	int err = 0;
> +	struct net_port_vlans *pv;
> +	unsigned short vid = VLAN_N_VID;
>  
>  	if (!(ndm->ndm_state &
> (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE))) { pr_info("bridge:
> RTM_NEWNEIGH with invalid state %#x\n", ndm->ndm_state); return
> -EINVAL; }
>  
> +	if (tb[NDA_VLAN]) {
> +		if (nla_len(tb[NDA_VLAN]) != sizeof(unsigned short))
> {
> +			pr_info("bridge: RTM_NEWNEIGH with invalid
> vlan\n");
> +			return -EINVAL;
> +		}
> +
> +		vid = nla_get_u16(tb[NDA_VLAN]);
> +
> +		if (vid >= VLAN_N_VID) {
> +			pr_info("bridge: RTM_NEWNEIGH with invalid
> vlan id %d\n",
> +				vid);
> +			return -EINVAL;
> +		}
> +	}
> +
>  	p = br_port_get_rtnl(dev);
>  	if (p == NULL) {
>  		pr_info("bridge: RTM_NEWNEIGH %s not a bridge
> port\n", @@ -637,41 +678,90 @@ int br_fdb_add(struct ndmsg *ndm,
> struct nlattr *tb[], return -EINVAL;
>  	}
>  
> -	if (ndm->ndm_flags & NTF_USE) {
> -		rcu_read_lock();
> -		br_fdb_update(p->br, p, addr, 0);
> -		rcu_read_unlock();
> +	pv = nbp_get_vlan_info(p);
> +	if (vid != VLAN_N_VID) {
> +		if (!pv || !test_bit(vid, pv->vlan_bitmap)) {
> +			pr_info("bridge: RTM_NEWNEIGH with
> unconfigured "
> +				"vlan %d on port %s\n", vid,
> dev->name);
> +			return -EINVAL;
> +		}
> +
> +		/* VID was specified, so use it. */
> +		err = __br_fdb_add(ndm, p, addr, nlh_flags, vid);
>  	} else {
> -		spin_lock_bh(&p->br->hash_lock);
> -		err = fdb_add_entry(p, addr, ndm->ndm_state,
> nlh_flags,
> -				0);
> -		spin_unlock_bh(&p->br->hash_lock);
> +		if (!pv || bitmap_empty(pv->vlan_bitmap,
> BR_VLAN_BITMAP_LEN)) {
> +			err = __br_fdb_add(ndm, p, addr, nlh_flags,
> 0);
> +			goto out;
> +		}
> +
> +		/* We have vlans configured on this port and user
> didn't
> +		 * specify a VLAN.  To be nice, add/update entry for
> every
> +		 * vlan on this port.
> +		 */
> +		vid = find_first_bit(pv->vlan_bitmap,
> BR_VLAN_BITMAP_LEN);
> +		while (vid < BR_VLAN_BITMAP_LEN) {
> +			err = __br_fdb_add(ndm, p, addr, nlh_flags,
> vid);
> +			if (err)
> +				goto out;
> +			vid = find_next_bit(pv->vlan_bitmap,
> +					    BR_VLAN_BITMAP_LEN,
> vid+1);
> +		}
>  	}
>  
> +out:
>  	return err;
>  }
>  
> -static int fdb_delete_by_addr(struct net_bridge_port *p, const u8
> *addr) +static int fdb_delete_by_addr(struct net_bridge *br, const u8
> *addr,
> +			      u16 vlan)
>  {
> -	struct net_bridge *br = p->br;
> -	struct hlist_head *head = &br->hash[br_mac_hash(addr, 0)];
> +	struct hlist_head *head = &br->hash[br_mac_hash(addr, vlan)];
>  	struct net_bridge_fdb_entry *fdb;
>  
> -	fdb = fdb_find(head, addr, 0);
> +	fdb = fdb_find(head, addr, vlan);
>  	if (!fdb)
>  		return -ENOENT;
>  
> -	fdb_delete(p->br, fdb);
> +	fdb_delete(br, fdb);
>  	return 0;
>  }
>  
> +static int __br_fdb_delete(struct net_bridge_port *p,
> +			   const unsigned char *addr, u16 vid)
> +{
> +	int err;
> +
> +	spin_lock_bh(&p->br->hash_lock);
> +	err = fdb_delete_by_addr(p->br, addr, vid);
> +	spin_unlock_bh(&p->br->hash_lock);
> +
> +	return err;
> +}
> +
>  /* Remove neighbor entry with RTM_DELNEIGH */
> -int br_fdb_delete(struct ndmsg *ndm, struct net_device *dev,
> +int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
> +		  struct net_device *dev,
>  		  const unsigned char *addr)
>  {
>  	struct net_bridge_port *p;
>  	int err;
> +	struct net_port_vlans *pv;
> +	unsigned short vid = VLAN_N_VID;
>  
> +	if (tb[NDA_VLAN]) {
> +		if (nla_len(tb[NDA_VLAN]) != sizeof(unsigned short))
> {
> +			pr_info("bridge: RTM_NEWNEIGH with invalid
> vlan\n");
> +			return -EINVAL;
> +		}
> +
> +		vid = nla_get_u16(tb[NDA_VLAN]);
> +
> +		if (vid >= VLAN_N_VID) {
> +			pr_info("bridge: RTM_NEWNEIGH with invalid
> vlan id %d\n",
> +				vid);
> +			return -EINVAL;
> +		}
> +	}
>  	p = br_port_get_rtnl(dev);
>  	if (p == NULL) {
>  		pr_info("bridge: RTM_DELNEIGH %s not a bridge
> port\n", @@ -679,9 +769,33 @@ int br_fdb_delete(struct ndmsg *ndm,
> struct net_device *dev, return -EINVAL;
>  	}
>  
> -	spin_lock_bh(&p->br->hash_lock);
> -	err = fdb_delete_by_addr(p, addr);
> -	spin_unlock_bh(&p->br->hash_lock);
> +	pv = nbp_get_vlan_info(p);
> +	if (vid != VLAN_N_VID) {
> +		if (!pv || !test_bit(vid, pv->vlan_bitmap)) {
> +			pr_info("bridge: RTM_DELNEIGH with
> unconfigured "
> +				"vlan %d on port %s\n", vid,
> dev->name);
> +			return -EINVAL;
> +		}
>  
> +		err = __br_fdb_delete(p, addr, vid);
> +	} else {
> +		if (!pv || bitmap_empty(pv->vlan_bitmap,
> BR_VLAN_BITMAP_LEN)) {
> +			err = __br_fdb_delete(p, addr, 0);
> +			goto out;
> +		}
> +
> +		/* We have vlans configured on this port and user
> didn't
> +		 * specify a VLAN.  To be nice, add/update entry for
> every
> +		 * vlan on this port.
> +		 */
> +		err = -ENOENT;
> +		vid = find_first_bit(pv->vlan_bitmap,
> BR_VLAN_BITMAP_LEN);
> +		while (vid < BR_VLAN_BITMAP_LEN) {
> +			err &= __br_fdb_delete(p, addr, vid);
> +			vid = find_next_bit(pv->vlan_bitmap,
> +					    BR_VLAN_BITMAP_LEN,
> vid+1);
> +		}
> +	}
> +out:
>  	return err;
>  }
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index eb197a9..7d2ae78 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -391,7 +391,7 @@ extern void br_fdb_update(struct net_bridge *br,
>  			  const unsigned char *addr,
>  			  u16 vid);
>  
> -extern int br_fdb_delete(struct ndmsg *ndm,
> +extern int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
>  			 struct net_device *dev,
>  			 const unsigned char *addr);
>  extern int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[],
> @@ -580,13 +580,13 @@ extern void nbp_vlan_flush(struct
> net_bridge_port *port); static inline struct net_port_vlans
> *br_get_vlan_info( const struct net_bridge *br)
>  {
> -	return rcu_dereference(br->vlan_info);
> +	return rcu_dereference_rtnl(br->vlan_info);
>  }
>  
>  static inline struct net_port_vlans *nbp_get_vlan_info(
>  						const struct
> net_bridge_port *p) {
> -	return rcu_dereference(p->vlan_info);
> +	return rcu_dereference_rtnl(p->vlan_info);
>  }
>  
>  /* Since bridge now depends on 8021Q module, but the time bridge
> sees the diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index e163a60..257b73e 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -2122,7 +2122,7 @@ static int rtnl_fdb_del(struct sk_buff *skb,
> struct nlmsghdr *nlh, void *arg) {
>  	struct net *net = sock_net(skb->sk);
>  	struct ndmsg *ndm;
> -	struct nlattr *llattr;
> +	struct nlattr *tb[NDA_MAX+1];
>  	struct net_device *dev;
>  	int err = -EINVAL;
>  	__u8 *addr;
> @@ -2130,8 +2130,9 @@ static int rtnl_fdb_del(struct sk_buff *skb,
> struct nlmsghdr *nlh, void *arg) if (!capable(CAP_NET_ADMIN))
>  		return -EPERM;
>  
> -	if (nlmsg_len(nlh) < sizeof(*ndm))
> -		return -EINVAL;
> +	err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL);
> +	if (err < 0)
> +		return err;
>  
>  	ndm = nlmsg_data(nlh);
>  	if (ndm->ndm_ifindex == 0) {
> @@ -2145,13 +2146,17 @@ static int rtnl_fdb_del(struct sk_buff *skb,
> struct nlmsghdr *nlh, void *arg) return -ENODEV;
>  	}
>  
> -	llattr = nlmsg_find_attr(nlh, sizeof(*ndm), NDA_LLADDR);
> -	if (llattr == NULL || nla_len(llattr) != ETH_ALEN) {
> -		pr_info("PF_BRIGDE: RTM_DELNEIGH with invalid
> address\n");
> +	if (!tb[NDA_LLADDR] || nla_len(tb[NDA_LLADDR]) != ETH_ALEN) {
> +		pr_info("PF_BRIDGE: RTM_DELNEIGH with invalid
> address\n");
> +		return -EINVAL;
> +	}
> +
> +	addr = nla_data(tb[NDA_LLADDR]);
> +	if (!is_valid_ether_addr(addr)) {
> +		pr_info("PF_BRIDGE: RTM_DELNEIGH with invalid ether
> address\n"); return -EINVAL;
>  	}
>  
> -	addr = nla_data(llattr);
>  	err = -EOPNOTSUPP;
>  
>  	/* Support fdb on master device the net/bridge default case
> */ @@ -2161,7 +2166,7 @@ static int rtnl_fdb_del(struct sk_buff *skb,
> struct nlmsghdr *nlh, void *arg) const struct net_device_ops *ops =
> br_dev->netdev_ops; 
>  		if (ops->ndo_fdb_del)
> -			err = ops->ndo_fdb_del(ndm, dev, addr);
> +			err = ops->ndo_fdb_del(ndm, tb, dev, addr);
>  
>  		if (err)
>  			goto out;
> @@ -2171,7 +2176,7 @@ static int rtnl_fdb_del(struct sk_buff *skb,
> struct nlmsghdr *nlh, void *arg) 
>  	/* Embedded bridge, macvlan, and any other device support */
>  	if ((ndm->ndm_flags & NTF_SELF) &&
> dev->netdev_ops->ndo_fdb_del) {
> -		err = dev->netdev_ops->ndo_fdb_del(ndm, dev, addr);
> +		err = dev->netdev_ops->ndo_fdb_del(ndm, tb, dev,
> addr); 
>  		if (!err) {
>  			rtnl_fdb_notify(dev, addr, RTM_DELNEIGH);

^ permalink raw reply

* Re: [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
From: Vlad Yasevich @ 2013-02-13 19:43 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, shemminger, bridge
In-Reply-To: <20130213.140851.2190933816965797127.davem@davemloft.net>

On 02/13/2013 02:08 PM, David Miller wrote:
> From: Vlad Yasevich <vyasevic@redhat.com>
> Date: Wed, 13 Feb 2013 12:41:37 -0500
>
>> Changes since v9:
>> * series re-ordering so make functionality more distinct.  Basic vlan
>>    filtering is patches 1-4.  Support for PVID/untagged vlans is patches
>>    5 and 6.  VLAN support for FDB/MDB is patches 7-11.  Patch 12 is
>>    still additional egress policy.
>> * Slight simplification to code that extracts the VID from skb.  Since we
>>    now depend on the vlan module, at the time of input skb_tci is guaranteed
>>    to be set if the packet had 8021q header.  We can simply refere to it.
>> * Changed the opaque 'parent' pointer from prior patches to a union so we
>>    can be much more explicit in our assignments.
>> * Lots of additional testing with STP turned on.  No issues were observed.
>
> Thanks a lot for keeping this series uptodate Vlad.
>
> Stephen, I think this series is ready, anything needed to be fixed still
> can be follow-on patches.  Agreed?

Looks like there are 2 more drivers that need to be update for 
ndo_fdb_del.  I'll rebase and re-spin.

-vlad

>
> Thanks.
>

^ permalink raw reply

* Re: [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
From: David Miller @ 2013-02-13 19:48 UTC (permalink / raw)
  To: vyasevic; +Cc: netdev, shemminger, bridge
In-Reply-To: <511BECC7.4040406@redhat.com>

From: Vlad Yasevich <vyasevic@redhat.com>
Date: Wed, 13 Feb 2013 14:43:03 -0500

> On 02/13/2013 02:08 PM, David Miller wrote:
>> From: Vlad Yasevich <vyasevic@redhat.com>
>> Date: Wed, 13 Feb 2013 12:41:37 -0500
>>
>>> Changes since v9:
>>> * series re-ordering so make functionality more distinct.  Basic vlan
>>>    filtering is patches 1-4.  Support for PVID/untagged vlans is patches
>>>    5 and 6.  VLAN support for FDB/MDB is patches 7-11.  Patch 12 is
>>>    still additional egress policy.
>>> * Slight simplification to code that extracts the VID from skb.  Since
>>> * we
>>>    now depend on the vlan module, at the time of input skb_tci is
>>>    guaranteed
>>>    to be set if the packet had 8021q header.  We can simply refere to it.
>>> * Changed the opaque 'parent' pointer from prior patches to a union so
>>> * we
>>>    can be much more explicit in our assignments.
>>> * Lots of additional testing with STP turned on.  No issues were
>>> * observed.
>>
>> Thanks a lot for keeping this series uptodate Vlad.
>>
>> Stephen, I think this series is ready, anything needed to be fixed
>> still
>> can be follow-on patches.  Agreed?
> 
> Looks like there are 2 more drivers that need to be update for
> ndo_fdb_del.  I'll rebase and re-spin.

Ok.

^ permalink raw reply

* Re: [PATCH nf-next] netfilter: nf_ct_reasm: fix per-netns sysctl initialization
From: Pablo Neira Ayuso @ 2013-02-13 19:49 UTC (permalink / raw)
  To: Michal Kubecek
  Cc: Patrick McHardy, netfilter-devel, coreteam, netdev, linux-kernel,
	Amerigo Wang
In-Reply-To: <20130213094810.64691C3A4E@unicorn.suse.cz>

On Wed, Feb 13, 2013 at 10:46:09AM +0100, Michal Kubecek wrote:
> Adjusting of data pointers in net/netfilter/nf_conntrack_frag6_*
> sysctl table for other namespaces points to wrong netns_frags
> structure and has reversed order of entries.
> 
> Problem introduced by commit c038a767cd69 in 3.7-rc1

Applied, thanks Michal.

^ permalink raw reply

* Re: [GIT PULL nf] IPVS fixes #2
From: Pablo Neira Ayuso @ 2013-02-13 20:13 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Daniel Borkmann
In-Reply-To: <20130207181213.GA18181@localhost>

Hi again Simon,

On Thu, Feb 07, 2013 at 07:12:13PM +0100, Pablo Neira Ayuso wrote:
> On Wed, Feb 06, 2013 at 10:24:37AM +0900, Simon Horman wrote:
> > Hi Pablo,
> > 
> > Another fix. This one seems suitable for stable all the way back to
> > 2.6.34. I suspect this change may not apply cleanly all the way back there.
> > Please let me know if I should prepare some backports.

While reviewing patches that I'll pass to -stable, I noticed that:

4b47bc9 ipvs: sctp: fix checksumming on snat and dnat handlers

depends on:

commit d4383f04d145cce8b855c463f40020639ef83ea0
Author: Jesper Dangaard Brouer <brouer@redhat.com>
Date:   Wed Sep 26 14:07:17 2012 +0200

    ipvs: API change to avoid rescan of IPv6 exthdr

which is too big to add as dependency (it does not fulfill -stable
rule of not bigger patches than 100 lines).

If you want to me pass this sctp fix to -stable, you or Daniel will
have to send me a backport.

Regards.

^ permalink raw reply

* Re: [Bridge] [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
From: Jonathan Thibault @ 2013-02-13 20:14 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: bridge@lists.linux-foundation.org, netdev
In-Reply-To: <1360777309-25522-1-git-send-email-vyasevic@redhat.com>

This is just a little note to chime in my enthusiasm over these
features.  I've been silently wishing for them for years, so most formal
thanks to you for the work you put in.

Jonathan

On 13/02/13 12:41 PM, Vlad Yasevich wrote:
> Changes since v9:
> * series re-ordering so make functionality more distinct.  Basic vlan
>   filtering is patches 1-4.  Support for PVID/untagged vlans is patches
>   5 and 6.  VLAN support for FDB/MDB is patches 7-11.  Patch 12 is
>   still additional egress policy.
> * Slight simplification to code that extracts the VID from skb.  Since we
>   now depend on the vlan module, at the time of input skb_tci is guaranteed
>   to be set if the packet had 8021q header.  We can simply refere to it.
> * Changed the opaque 'parent' pointer from prior patches to a union so we
>   can be much more explicit in our assignments.
> * Lots of additional testing with STP turned on.  No issues were observed.
>
> Changes since v8:
> * Unified vlans_to_* calls into a single interface
> * Fixed the rest of the issues report by Michal Miroslaw
> * Fixed a bug where fdb entries were not created for all added vlans.
>
> Changes since v7:
> * Rebases on the latest net-next and removed the vlan wrapper patch from
> the series.
> * Fixed a crash in br_fdb_add/br_fdb_delete.
>
> Changes since v6:
> * VLANs are now stored in a VLAN bitmap per port.  This allows for O(1)
> lookup at ingress and egress.  We simply check to see if the bit associated
> with the vlan id is set in the map.  The drawback to this approach is that
> it wastes some space when there is only a small number of VLANs.
> * In addition to the build time configuration option, VLAN filtering also has
> a configuration paramter in sysfs.  By default the filtering is turned off
> and all traffic is permitted.  When the filtring is turned on, we do strict
> matching to the filter configured.  Thus, if there is no configuration, all
> packets are rejected.  This was done to make the behavior more streight
> forward.  Without this (and if egress policy patch is rejected), the
> decision for how to forward untagged traffic that was not filtered at ingress
> is almost impossible to make.  It would not be right to deliver to every
> port that has PVID set as, each port may have a different PVID.
> * Separate egress policy bitmap patch has been isolated and is provided last
> in the series.  This has been a more contentious piece of functionality and I
> wanted to isolate it so that it could easily be dropped and not block the whole
> series.
>
> Changes since v5:
>  - Pulled VLAN filtering into its own file and made it a configuration options.
>  - Made new vlan filtering option dependent on VLAN_8021Q.
>  - Got rid of HW filter inlines and moved then vlan_core.c.
>    (All of the above suggested by Stephen Hemminger)
>
> Changes since v4:
>  - Pull per-port vlan data into its own structures and give it to the bridge
>    device thus making bridge device behave like a regular port for vlan
>    configuration.
>  - Add a per-vlan 'untagged' bitmap that determins egress policy.  If a port
>    is part of this bitmap, traffic egresses untagged.
>  - PVID is now used for ingress policy only.  Incomming frames without VLAN tag
>    are assigned to the PVID vlan.  Egress is determined via bitmap memberships.
>  - Allow for incremental config of a vlan.  Now, PVID and untagged memberships
>    may be set on existing vlans.  They however can NOT be cleared separately.
>  - VLAN deletion is now done via RTM_DELLINK command for PF_BRIDGE family.
>    This cleans up the netlink interface.
>
> Changes since v3:
>  - Re-integrated compiler problems that got left out last time.  Appologies.
>  - checkpatches.pl errors fixed
>
> Changes since v2:
>  - Added inline functiosn to manimulate vlan hw filters and re-use in 8021q
>    and bridge code.
>  - Use rtnl_dereference (Michael Tsirkin)
>  - Remove synchronize_net() call (Eric Dumazet)
>  - Fix NULL ptr deref bug I introduced in br_ifinfo_notify.
>
> Changes since v1:
>  - Fixed some forwarding bugs.
>  - Add vlan to local fdb entries.  New local entries are created per vlan
>    to facilite correct forwarding to bridge interface.
>  - Allow configuration of vlans directly on the bridge master device
>    in addition to ports.
>
> Changes since rfc v2:
>  - Per-port vlan bitmap is gone and is replaced with a vlan list.
>  - Added bridge vlan list, which is referenced by each port.  Entries in
>    the birdge vlan list have port bitmap that shows which port are parts
>    of which vlan.
>  - Netlink API changes.
>  - Dropped sysfs support for now.  If people think this is really usefull,
>    can add it back.
>  - Support for native/untagged vlans.
>
> Changes since rfc v1:
>  - Comments addressed regarding formatting and RCU usage
>  - iocts have been removed and changed over the netlink interface.
>  - Added support of user added ndb entries.
>  - changed sysfs interface to export a bitmap.  Also added a write interface.
>    I am not sure how much I like it, but it made my testing easier/faster.  I
>    might change the write interface to take text instead of binary.
>
> Vlad Yasevich (12):
>   bridge: Add vlan filtering infrastructure
>   bridge: Validate that vlan is permitted on ingress
>   bridge: Verify that a vlan is allowed to egress on give port
>   bridge: Add netlink interface to configure vlans on bridge ports
>   bridge: Add the ability to configure pvid
>   bridge: Implement vlan ingress/egress policy
>   bridge: Add vlan to unicast fdb entries
>   bridge: Add vlan id to multicast groups
>   bridge: Add vlan support to static neighbors
>   bridge: Add vlan support for local fdb entries
>   bridge: Dump vlan information from a bridge port
>   bridge: Separate egress policy bitmap
>
>
> Vlad Yasevich (12):
>   bridge: Add vlan filtering infrastructure
>   bridge: Validate that vlan is permitted on ingress
>   bridge: Verify that a vlan is allowed to egress on given port
>   bridge: Add netlink interface to configure vlans on bridge ports
>   bridge: Dump vlan information from a bridge port
>   bridge: Implement vlan ingress/egress policy with PVID.
>   bridge: Add the ability to configure pvid
>   bridge: Add vlan to unicast fdb entries
>   bridge: Add vlan id to multicast groups
>   bridge: Add vlan support to static neighbors
>   bridge: Add vlan support for local fdb entries
>   bridge: Separate egress policy bitmap
>
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    5 +-
>  drivers/net/macvlan.c                         |    2 +-
>  drivers/net/vxlan.c                           |    3 +-
>  include/linux/netdevice.h                     |    6 +-
>  include/uapi/linux/if_bridge.h                |   11 +
>  include/uapi/linux/neighbour.h                |    1 +
>  include/uapi/linux/rtnetlink.h                |    1 +
>  net/8021q/vlan_core.c                         |    1 +
>  net/bridge/Kconfig                            |   14 +
>  net/bridge/Makefile                           |    2 +
>  net/bridge/br_device.c                        |    7 +-
>  net/bridge/br_fdb.c                           |  258 ++++++++++++---
>  net/bridge/br_forward.c                       |    9 +
>  net/bridge/br_if.c                            |    4 +-
>  net/bridge/br_input.c                         |   28 ++-
>  net/bridge/br_multicast.c                     |   69 +++--
>  net/bridge/br_netlink.c                       |  242 +++++++++++++--
>  net/bridge/br_private.h                       |  175 ++++++++++-
>  net/bridge/br_sysfs_br.c                      |   21 ++
>  net/bridge/br_vlan.c                          |  415 +++++++++++++++++++++++++
>  net/core/rtnetlink.c                          |  111 ++++++-
>  21 files changed, 1257 insertions(+), 128 deletions(-)
>  create mode 100644 net/bridge/br_vlan.c
>

^ permalink raw reply

* Re: [PATCH] Don't allow multiple TPGs or targets to share a portal
From: Nicholas A. Bellinger @ 2013-02-13 20:31 UTC (permalink / raw)
  To: Andy Grover; +Cc: target-devel, netdev
In-Reply-To: <1360364708-26104-1-git-send-email-agrover@redhat.com>

On Fri, 2013-02-08 at 15:05 -0800, Andy Grover wrote:
> RFC 3720 says "Each Network Portal, as utilized by a given iSCSI Node,
> belongs to exactly one portal group within that node." therefore
> iscsit_add_np should not check for existing matching portals, it should
> just go ahead and try to make the portal, and then kernel_bind() will
> return the proper error.
> 
> Signed-off-by: Andy Grover <agrover@redhat.com>
> ---

NACK.  Your interpretation of RFC-3720 is incorrect.  There is nothing
that says that a single IP address cannot be shared across multiple
TargetName+TargetPortalGroupTag endpoints.

--nab

>  drivers/target/iscsi/iscsi_target.c |   64 -----------------------------------
>  1 files changed, 0 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
> index 339f97f..73be05c 100644
> --- a/drivers/target/iscsi/iscsi_target.c
> +++ b/drivers/target/iscsi/iscsi_target.c
> @@ -264,64 +264,6 @@ int iscsit_deaccess_np(struct iscsi_np *np, struct iscsi_portal_group *tpg)
>  	return 0;
>  }
>  
> -static struct iscsi_np *iscsit_get_np(
> -	struct __kernel_sockaddr_storage *sockaddr,
> -	int network_transport)
> -{
> -	struct sockaddr_in *sock_in, *sock_in_e;
> -	struct sockaddr_in6 *sock_in6, *sock_in6_e;
> -	struct iscsi_np *np;
> -	int ip_match = 0;
> -	u16 port;
> -
> -	spin_lock_bh(&np_lock);
> -	list_for_each_entry(np, &g_np_list, np_list) {
> -		spin_lock(&np->np_thread_lock);
> -		if (np->np_thread_state != ISCSI_NP_THREAD_ACTIVE) {
> -			spin_unlock(&np->np_thread_lock);
> -			continue;
> -		}
> -
> -		if (sockaddr->ss_family == AF_INET6) {
> -			sock_in6 = (struct sockaddr_in6 *)sockaddr;
> -			sock_in6_e = (struct sockaddr_in6 *)&np->np_sockaddr;
> -
> -			if (!memcmp(&sock_in6->sin6_addr.in6_u,
> -				    &sock_in6_e->sin6_addr.in6_u,
> -				    sizeof(struct in6_addr)))
> -				ip_match = 1;
> -
> -			port = ntohs(sock_in6->sin6_port);
> -		} else {
> -			sock_in = (struct sockaddr_in *)sockaddr;
> -			sock_in_e = (struct sockaddr_in *)&np->np_sockaddr;
> -
> -			if (sock_in->sin_addr.s_addr ==
> -			    sock_in_e->sin_addr.s_addr)
> -				ip_match = 1;
> -
> -			port = ntohs(sock_in->sin_port);
> -		}
> -
> -		if ((ip_match == 1) && (np->np_port == port) &&
> -		    (np->np_network_transport == network_transport)) {
> -			/*
> -			 * Increment the np_exports reference count now to
> -			 * prevent iscsit_del_np() below from being called
> -			 * while iscsi_tpg_add_network_portal() is called.
> -			 */
> -			np->np_exports++;
> -			spin_unlock(&np->np_thread_lock);
> -			spin_unlock_bh(&np_lock);
> -			return np;
> -		}
> -		spin_unlock(&np->np_thread_lock);
> -	}
> -	spin_unlock_bh(&np_lock);
> -
> -	return NULL;
> -}
> -
>  struct iscsi_np *iscsit_add_np(
>  	struct __kernel_sockaddr_storage *sockaddr,
>  	char *ip_str,
> @@ -331,12 +273,6 @@ struct iscsi_np *iscsit_add_np(
>  	struct sockaddr_in6 *sock_in6;
>  	struct iscsi_np *np;
>  	int ret;
> -	/*
> -	 * Locate the existing struct iscsi_np if already active..
> -	 */
> -	np = iscsit_get_np(sockaddr, network_transport);
> -	if (np)
> -		return np;
>  
>  	np = kzalloc(sizeof(struct iscsi_np), GFP_KERNEL);
>  	if (!np) {

^ permalink raw reply

* [PATCH 0/3] netfilter fixes for 3.7-rc8
From: pablo @ 2013-02-13 20:38 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

From: Pablo Neira Ayuso <pablo@netfilter.org>

Hi David,

The following patchset contains three Netfilter fixes, they are:

* Fix conntrack helper re-assignment after NAT mangling if only if
  the same helper is attached to the conntrack again, from Florian
  Westphal.

* Don't allow the creation of conntrack entries via ctnetlink if the
  original and reply tuples are missing, from Florian Westphal.

* Fix broken sysctl interface in nf_ct_reasm while adding netns support
  to it, from Michal Kubecek.

Again, these are coming very late but they seem small and non-intrusive to me.
If case your verdict is positive, you can pull this changes from:

git://1984.lsi.us.es/nf master

Thanks!

Florian Westphal (2):
  netfilter: ctnetlink: don't permit ct creation with random tuple
  netfilter: nf_ct_helper: don't discard helper if it is actually the same

Michal Kubeček (1):
  netfilter: nf_ct_reasm: fix per-netns sysctl initialization

 net/ipv6/netfilter/nf_conntrack_reasm.c |    6 +++---
 net/netfilter/nf_conntrack_helper.c     |    4 +++-
 net/netfilter/nf_conntrack_netlink.c    |    3 +++
 3 files changed, 9 insertions(+), 4 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH 1/3] netfilter: ctnetlink: don't permit ct creation with random tuple
From: pablo @ 2013-02-13 20:38 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1360787913-10335-1-git-send-email-pablo@netfilter.org>

From: Florian Westphal <fw@strlen.de>

Userspace can cause kernel panic by not specifying orig/reply
tuple: kernel will create a tuple with random stack values.

Problem is that tuple.dst.dir will be random, too, which
causes nf_ct_tuplehash_to_ctrack() to return garbage.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
---
 net/netfilter/nf_conntrack_netlink.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 627b0e5..a081915 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1705,6 +1705,9 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
 		if (nlh->nlmsg_flags & NLM_F_CREATE) {
 			enum ip_conntrack_events events;
 
+			if (!cda[CTA_TUPLE_ORIG] || !cda[CTA_TUPLE_REPLY])
+				return -EINVAL;
+
 			ct = ctnetlink_create_conntrack(net, zone, cda, &otuple,
 							&rtuple, u3);
 			if (IS_ERR(ct))
-- 
1.7.10.4


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox