[HOWTO?] packet: tx-only socket / binding to "nothing"?

2019-07-26 Thread David Lamparter
Hi netdev, quick question: is there a recommended setup to get a send-only packet socket? I've been reading net/packet/af_packet.c up and down and don't see an explicit way, so I ended up binding to ("lo", ETH_P_LOOP) instead. (Nothing special about ETH_P_LOOP, I just grabbed a random value tha

Re: [RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-22 Thread David Lamparter
On Tue, Aug 22, 2017 at 02:55:04PM +0300, Nikolay Aleksandrov wrote: > On 22/08/17 14:32, David Lamparter wrote: > > On Tue, Aug 22, 2017 at 02:01:40PM +0300, Nikolay Aleksandrov wrote: > >> On 22/08/17 03:01, Stephen Hemminger wrote: > >>> I know the bridge

Re: [RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-22 Thread David Lamparter
On Tue, Aug 22, 2017 at 02:01:40PM +0300, Nikolay Aleksandrov wrote: > On 22/08/17 03:01, Stephen Hemminger wrote: > > I know the bridge is an easy target to extend L2 forwarding, but it is not > > the only option. Have you condidered building a new driver (like VXLAN does) > > which does the forwa

Re: [RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-22 Thread David Lamparter
On Mon, Aug 21, 2017 at 09:43:15PM -0700, Roopa Prabhu wrote: > > This is relevant to the discussion because it's a feature which is > > non-obvious (to me) on how to do with the VXLAN model of having an > > entirely separate FDB. Meanwhile, with this architecture, the proof of > > concept / hack

Re: [RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-21 Thread David Lamparter
On Mon, Aug 21, 2017 at 05:01:51PM -0700, Stephen Hemminger wrote: > On Mon, 21 Aug 2017 19:15:17 +0200 David Lamparter wrote: > > > P.S.: For a little context on the bridge FDB changes - I'm hoping to > > > find some time to extend this to the MDB to allow aggregat

[PATCH 2/6] bridge: lwtunnel netlink interface

2017-08-21 Thread David Lamparter
be just pass the entire netlink attr block down?] Signed-off-by: David Lamparter --- include/linux/netdevice.h | 18 + include/net/ip_tunnels.h | 5 +++ include/uapi/linux/neighbour.h | 2 + net/bridge/br.c| 2 +- net/

[PATCH 5/6] mpls: add VPLS entry points

2017-08-21 Thread David Lamparter
abling G-ACh or LSP ping.)] Signed-off-by: David Lamparter --- include/uapi/linux/rtnetlink.h | 5 net/mpls/af_mpls.c | 65 ++ net/mpls/internal.h| 40 ++ 3 files changed, 104 insertions(+), 6 deletions

[PATCH 4/6] mpls: split forwarding path on rx/tx boundary

2017-08-21 Thread David Lamparter
This makes mpls_rt_xmit() available for use in upcoming VPLS code. Same for mpls_route_input_rcu(). Signed-off-by: David Lamparter --- net/mpls/af_mpls.c | 48 ++-- net/mpls/internal.h | 4 2 files changed, 34 insertions(+), 18 deletions

[PATCH 3/6] gretap: support lwtunnel under bridge (NVGRE)

2017-08-21 Thread David Lamparter
appropriately. VLAN to key mapping is not supported. Implementing NVGRE was actually an unintentional side effect. [v2: move src/dst flipping to RX path, allow zero tunnel daddr] Signed-off-by: David Lamparter --- net/ipv4/ip_gre.c| 40 +++- net/ipv4

[PATCH 6/6] mpls: VPLS support

2017-08-21 Thread David Lamparter
[work-in-progress, works but needs changes] [v2: refactored lots of things, e.g. dst_metadata, no more genetlink] [v4: removed pointless include/net/vpls.h, squashed pseudowire control word support, squashed netlink lwtunnel access bits] Signed-off-by: David Lamparter --- include/net

[RFC net-next v2] bridge lwtunnel, VPLS & NVGRE

2017-08-21 Thread David Lamparter
Hi all, this is an update on the earlier "[RFC net-next] VPLS support". Note I've changed the subject lines on some of the patches to better reflect what they really do (tbh the earlier subject lines were crap.) As previously, iproute2 / FRR patches are at: - https://github.com/eqvinox/vpls-ipr

[PATCH 1/6] bridge: lwtunnel support in FDB

2017-08-21 Thread David Lamparter
fixed race in fdb update with atomic_xchg] [v3: consistently use metadata_dst pointer] [v4: patch renamed] Signed-off-by: David Lamparter --- include/net/dst_metadata.h | 27 ++- net/bridge/br_device.c | 4 net/bridge/br

Re: [PATCH 4/6] mpls: VPLS support

2017-08-21 Thread David Lamparter
On Mon, Aug 21, 2017 at 05:14:46PM +0200, Amine Kherbouche wrote: > > +#include > > some headers are not needed. Which ones? net/ip_tunnels.h is needed for ip_tunnel_get_stats64(). > > +static netdev_tx_t vpls_xmit(struct sk_buff *skb, struct net_device *dev) > > +{ > > + int err = -EINVAL,

Re: [PATCH 3/6] mpls: add VPLS entry points

2017-08-21 Thread David Lamparter
On Mon, Aug 21, 2017 at 04:01:15PM +0200, Amine Kherbouche wrote: > On 08/16/2017 07:01 PM, David Lamparter wrote: > > This wires up the neccessary calls for VPLS into the MPLS forwarding > > pieces. Since CONFIG_MPLS_VPLS doesn't exist yet in Kconfig, it'll > > ne

[PATCH net-next] net: check type when freeing metadata dst

2017-08-18 Thread David Lamparter
s far enough back in the struct to be zeroed for the only other type currently in existance (METADATA_HW_PORT_MUX), but nevertheless it's not correct. Fixes: 3fcece12bc1b ("net: store port/representator id in metadata_dst") Signed-off-by: David Lamparter Cc: Jakub Kicinski Cc: Srid

[PATCH net-next] net: check type when freeing metadata dst

2017-08-18 Thread David Lamparter
ack in the struct to be zeroed for the only other type currently in existance (METADATA_HW_PORT_MUX), but nevertheless it's not correct. Fixes: 3fcece12bc1b6dcdf0986f2cd9e8f63b1f9b6aa0 Signed-off-by: David Lamparter Cc: Jakub Kicinski Cc: Sridhar Samudrala Cc: Simon Horman Cc: David S. Mi

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-17 Thread David Lamparter
On Wed, Aug 16, 2017 at 11:38:06PM +0300, Nikolay Aleksandrov wrote: > On 16/08/17 20:01, David Lamparter wrote: > > This implements holding dst metadata information in the bridge layer, > > but only for unicast entries in the MAC table. Multicast is still left > > to

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-17 Thread David Lamparter
On Thu, Aug 17, 2017 at 02:39:43PM +0300, Nikolay Aleksandrov wrote: > On 17/08/17 14:03, David Lamparter wrote: > > On Wed, Aug 16, 2017 at 11:38:06PM +0300, Nikolay Aleksandrov wrote: > >> On 16/08/17 20:01, David Lamparter wrote: > >> and hitting the fast path for

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-17 Thread David Lamparter
On Thu, Aug 17, 2017 at 02:10:20PM +0200, David Lamparter wrote: > On Thu, Aug 17, 2017 at 02:51:12PM +0300, Nikolay Aleksandrov wrote: > > On 17/08/17 14:39, Nikolay Aleksandrov wrote: > > > On 17/08/17 14:03, David Lamparter wrote: > > >> On Wed, Aug 16, 201

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-17 Thread David Lamparter
On Thu, Aug 17, 2017 at 02:51:12PM +0300, Nikolay Aleksandrov wrote: > On 17/08/17 14:39, Nikolay Aleksandrov wrote: > > On 17/08/17 14:03, David Lamparter wrote: > >> On Wed, Aug 16, 2017 at 11:38:06PM +0300, Nikolay Aleksandrov wrote: [cut] > >>> and hitting the f

Re: [PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-17 Thread David Lamparter
Hi Nikolay, On Wed, Aug 16, 2017 at 11:38:06PM +0300, Nikolay Aleksandrov wrote: > On 16/08/17 20:01, David Lamparter wrote: > > This implements holding dst metadata information in the bridge layer, > > but only for unicast entries in the MAC table. Multicast is still left &g

[PATCH 4/6] mpls: VPLS support

2017-08-16 Thread David Lamparter
[work-in-progress, works but needs changes] [v2: refactored lots of things, e.g. dst_metadata, no more genetlink] Signed-off-by: David Lamparter --- include/net/dst_metadata.h | 21 ++ include/net/vpls.h | 8 + net/mpls/Kconfig | 11 ++ net/mpls/Makefile | 1

[PATCH 5/6] bridge: add VPLS pseudowire info in fdb dump

2017-08-16 Thread David Lamparter
Add a NDA_VPLS_WIRE attribute to the FDB dump if we have dst metadata that is indicative of a VPLS pseudowire. This is really helpful for debugging. Signed-off-by: David Lamparter --- include/uapi/linux/neighbour.h | 1 + net/bridge/br_fdb.c| 12 2 files changed, 13

[RFC net-next] VPLS support

2017-08-16 Thread David Lamparter
Hi all, triggered by Amine posting VPLS support earlier, this is what I had in mind on my end. You may note the patches share some bits, this is because both series are derived from hacks I did at 33C3 in December 2016. This patchset is different in the following ways: - one vpls device encapsu

[PATCH 2/6] mpls: split forwarding path on rx/tx boundary

2017-08-16 Thread David Lamparter
This makes mpls_rt_xmit() available for use in upcoming VPLS code. Same for mpls_route_input_rcu(). Signed-off-by: David Lamparter --- net/mpls/af_mpls.c | 48 ++-- net/mpls/internal.h | 4 2 files changed, 34 insertions(+), 18 deletions

[PATCH 6/6] mpls: pseudowire control word support

2017-08-16 Thread David Lamparter
[TODO: maybe rename this to MPLS_FLAGS and use it for non-pseudowire OAM bits too (e.g. enabling G-ACh or LSP ping.)] Signed-off-by: David Lamparter --- include/uapi/linux/rtnetlink.h | 4 net/mpls/af_mpls.c | 11 +++ net/mpls/internal.h| 8 ++-- net

[PATCH 3/6] mpls: add VPLS entry points

2017-08-16 Thread David Lamparter
This wires up the neccessary calls for VPLS into the MPLS forwarding pieces. Since CONFIG_MPLS_VPLS doesn't exist yet in Kconfig, it'll never be enabled, so we're on the stubs for now. Signed-off-by: David Lamparter --- include/uapi/linux/rtnetlink.h | 1 + net/mpls/af_mpls.c

[PATCH 1/6] bridge: learn dst metadata in FDB

2017-08-16 Thread David Lamparter
This implements holding dst metadata information in the bridge layer, but only for unicast entries in the MAC table. Multicast is still left to design and implement. Signed-off-by: David Lamparter --- include/net/dst_metadata.h | 19 +-- net/bridge/br_device.c | 4

Re: [PATCH 1/2] mpls: add handlers

2017-08-15 Thread David Lamparter
On Sat, Aug 12, 2017 at 08:29:18PM -0700, Roopa Prabhu wrote: > On Sat, Aug 12, 2017 at 6:35 AM, Amine Kherbouche > wrote: > > > > > > On 11/08/2017 16:37, Roopa Prabhu wrote: > >> > >> On Fri, Aug 11, 2017 at 5:34 AM, David Lamparter > >> wr

Re: [PATCH 2/2] drivers: add vpls support

2017-08-11 Thread David Lamparter
On Thu, Aug 10, 2017 at 10:28:37PM +0200, Amine Kherbouche wrote: > This commit introduces the support of VPLS virtual device, that allows > performing L2VPN multipoint to multipoint communication over MPLS PSN. > > VPLS device encap received ethernet frame over mpls packet and send it the > outp

Re: [PATCH 1/2] mpls: add handlers

2017-08-11 Thread David Lamparter
On Thu, Aug 10, 2017 at 10:28:36PM +0200, Amine Kherbouche wrote: > Mpls handler allows creation/deletion of mpls routes without using > rtnetlink. When an incoming mpls packet matches this route, the saved > function handler is called. Since I originally authored this patch, I have come to believ

Re: [net-next] net: l3mdev: address selection should only consider devices in L3 domain

2016-02-16 Thread David Lamparter
Well, unfortunately... [below] On Tue, Feb 16, 2016 at 02:59:51PM -0800, David Ahern wrote: > +++ b/net/ipv4/devinet.c > @@ -1214,12 +1215,16 @@ __be32 inet_select_addr(const struct net_device *dev, > __be32 dst, int scope) > if (addr) > goto out_unlock; > no_in_dev: > +

[net-next] net: l3mdev: prefer VRF master for source address selection

2016-02-16 Thread David Lamparter
well be a non-routable address. Cc: David Ahern Signed-off-by: David Lamparter --- This patch applies on top of the one by dsa@ in the root of this thread. --- net/ipv4/devinet.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c

[PATCH] iproute2: Format IPv6 tunnels endpoints nicely.

2007-06-09 Thread David Lamparter
Change formatting of IPv6 tunnel endpoints from hex chain to standard IPv6 representation. Signed-off-by: David Lamparter <[EMAIL PROTECTED]> --- lib/ll_addr.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/ll_addr.c b/lib/ll_addr.c index 581487d..f558050

mac80211 ad-hoc: carrier not set up [was: Panic in ieee_80211_ibss_add_sta]

2007-05-15 Thread David Lamparter
turn ieee80211_sta_find_ibss(dev, ifsta); However, I have NO CLUE WHAT I'M DOING THERE! Make a proper fix! (Especially, I think it needs more netif_carrier_off calls in different places.) Anyway, thanks for my now-working wireless, David Lamparter - To unsubscribe from this list: send t

Panic in ieee_80211_ibss_add_sta when trying to join ad-hoc network (rt2500pci)

2007-05-15 Thread David LAMPARTER
rtpanic/ (includes pictures of the panics, in case I have a typo somewhere) Requests for more information / patches welcome, but expect delayed response. More information attached. Greetings, David Lamparter BUG: unable to handle kernel NULL pointer derference at virtual address 021