ep "bytes from $from" instead.
Fixes: 40f98b9af943 ("selftests: add a selftest for directed broadcast
forwarding")
Signed-off-by: Xin Long
---
tools/testing/selftests/net/forwarding/router_broadcast.sh | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
d broadcast forwarding")
Reported-by: Jianlin Shi
Signed-off-by: Xin Long
---
net/ipv4/route.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 11ddc27..91bf75b 100644
--- a/net/ipv4/route.c
+++ b
7;from' cookie, this patch is to remove the c1 check
in rt6_get_cookie(), so that the dst_cookie can always be set properly.
c1:
(rt->rt6i_flags & RTF_PCPU || unlikely(!list_empty(&rt->rt6i_uncached)))
Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst base
On Tue, Jun 4, 2019 at 4:34 AM Neil Horman wrote:
>
> syzbot found the following leak in sctp_process_init
> BUG: memory leak
> unreferenced object 0x88810ef68400 (size 1024):
> comm "syz-executor273", pid 7046, jiffies 4294945598 (age 28.770s)
> hex dump (first 32 bytes):
> 1d de 28 8
On Thu, Jun 6, 2019 at 11:35 PM David Ahern wrote:
>
> On 6/2/19 5:10 AM, Xin Long wrote:
> > In Jianlin's testing, netperf was broken with 'Connection reset by peer',
> > as the cookie check failed in rt6_check() and ip6_dst_check() always
> > returned NULL
gt; > > > On Wed, Jun 05, 2019 at 04:16:24AM +0800, Xin Long wrote:
> > > > > On Tue, Jun 4, 2019 at 4:34 AM Neil Horman
> > > > > wrote:
> > > > > >
> > > > > > syzbot found the following leak in sctp_process_init
> > &g
27;t leak cookie memory, free any previously
> allocated cookie first.
Hi, Neil,
I think we should also do the same thing to the other 2 kmemdups in
sctp_process_param():
asoc->peer.peer_random
asoc->peer.peer_hmacs
>
> Signed-off-by: Neil Horman
> CC: Marcelo Ricardo Leitne
This patchset is to factor out some common code for
sctp_sendmsg_new_asoc() and __sctp_connect() into 2
new functioins.
Xin Long (4):
sctp: check addr_size with sa_family_t size in
__sctp_setsockopt_connectx
sctp: clean up __sctp_connect
sctp: factor out sctp_connect_new_asoc
sctp
In this function factored out from sctp_sendmsg_new_asoc() and
__sctp_connect(), it creates the asoc and adds a peer with the
1st addr.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 160 ++
1 file changed, 76 insertions(+), 84 deletions
-off-by: Xin Long
---
net/sctp/socket.c | 211 +++---
1 file changed, 75 insertions(+), 136 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 5f92e4a..49837e9 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1049,154
.
So before doing that, __sctp_setsockopt_connectx() should do
this check first, as sctp_inet_connect() does.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index aa80cda..5f92e4a 100644
--- a
In this function factored out from sctp_sendmsg_new_asoc() and
__sctp_connect(), it adds a peer with the other addr into the
asoc after this asoc is created with the 1st addr.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 76 +++
1 file
On Tue, Jul 23, 2019 at 11:25 PM Neil Horman wrote:
>
> On Tue, Jul 23, 2019 at 01:37:57AM +0800, Xin Long wrote:
> > Now __sctp_connect() is called by __sctp_setsockopt_connectx() and
> > sctp_inet_connect(), the latter has done addr_size check with size
> > of sa_famil
On Sun, Jun 2, 2019 at 9:36 PM Xin Long wrote:
>
> On Sun, Jun 2, 2019 at 6:52 PM Neil Horman wrote:
> >
> > On Sun, Jun 02, 2019 at 11:44:29AM +0800, Hillf Danton wrote:
> > >
> > > syzbot found the following crash on:
> > >
> > > HEAD com
gt; > > > On Wed, Jul 24, 2019 at 09:49:07AM -0300, Marcelo Ricardo Leitner wrote:
> > > > > On Wed, Jul 24, 2019 at 09:36:50AM -0300, Marcelo Ricardo Leitner
> > > > > wrote:
> > > > > > On Wed, Jul 24, 2019 at 07:22:35AM -0400, Neil Hor
length of data
only to sctp_assoc_add_peer().
So sctp_transport_init() should copy the only available data from
addr to peer->ipaddr, instead of 'peer->ipaddr = *addr' which may
cause slab-out-of-bounds.
Signed-off-by: Xin Long
---
net/sctp/transport.c | 2 +-
1 file changed, 1 i
rcelo noticed in patch 3/5.
Xin Long (5):
sctp: only copy the available addr data in sctp_transport_init
sctp: check addr_size with sa_family_t size in
__sctp_setsockopt_connectx
sctp: clean up __sctp_connect
sctp: factor out sctp_connect_new_asoc
sctp: factor out sctp_connect_add_pe
.
So before doing that, __sctp_setsockopt_connectx() should do
this check first, as sctp_inet_connect() does.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index aa80cda..e9c5b39 100644
at it, also remove the unused 'addrcnt'.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 209 +++---
1 file changed, 73 insertions(+), 136 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e9c5b39..b9804e5 100644
---
In this function factored out from sctp_sendmsg_new_asoc() and
__sctp_connect(), it adds a peer with the other addr into the
asoc after this asoc is created with the 1st addr.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 76 +++
1 file
In this function factored out from sctp_sendmsg_new_asoc() and
__sctp_connect(), it creates the asoc and adds a peer with the
1st addr.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 160 ++
1 file changed, 76 insertions(+), 84 deletions
eate(struct net *net, struct socket
> *sock,
> tsk_set_unreturnable(tsk, true);
> if (sock->type == SOCK_DGRAM)
> tsk_set_unreliable(tsk, true);
> - __skb_queue_head_init(&tsk->mc_method.deferredq);
> }
> -
> + __skb_queue_head_init(&tsk->mc_method.deferredq);
> trace_tipc_sk_create(sk, NULL, TIPC_DUMP_NONE, " ");
> return 0;
> }
> --
> 2.1.4
>
>
Reviewed-by: Xin Long
"sctp: Implement quick failover draft from tsvwg")
Signed-off-by: Xin Long
---
net/sctp/sm_sideeffect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index a554d6d..1cf5bb5 100644
--- a/net/sctp/sm_sideeffect.c
+++
On Wed, Jan 13, 2021 at 1:43 AM Cong Wang wrote:
>
> On Tue, Jan 12, 2021 at 3:52 AM Xin Long wrote:
> >
> > On Tue, Jan 12, 2021 at 10:56 AM Cong Wang wrote:
> > >
> > > From: Cong Wang
> > >
> > > fl_set_enc_opt() simply checks if ther
On Wed, Jan 13, 2021 at 10:11 AM Alexander Duyck
wrote:
>
> On Mon, Jan 11, 2021 at 9:14 PM Xin Long wrote:
> >
> > On Tue, Jan 12, 2021 at 12:48 AM Alexander Duyck
> > wrote:
> > >
> > > On Mon, Jan 11, 2021 at 5:22 AM Xin Long wrote:
> > &
Currently, udp v6 socket can not process v4 packets with UDP GRO, as
udp_encap_needed_key is not increased when udp_tunnel_encap_enable()
is called for v6 socket. This patchset is to increase it and remove
the unnecessary code in bareudp.
v1->v2:
- see Patch 1/2.
Xin Long (2):
udp: c
, and correspondingly
decrease udp_encap_needed_key in udpv6_destroy_sock().
v1->v2:
- add udp_encap_disable() and export it.
Signed-off-by: Xin Long
---
include/net/udp.h| 1 +
include/net/udp_tunnel.h | 3 +--
net/ipv4/udp.c | 6 ++
net/ipv6/udp.c | 4 +++-
4 files cha
As udp_encap_enable() is already called in udp_tunnel_encap_enable()
since the last patch, and we don't need it any more. So remove it by
reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d.
---
drivers/net/bareudp.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/net/bareud
Patch 1/2 is to improve the code in skb_segment(), and it is needed
by Patch 2/2.
v1->v2:
- see Patch 1/2.
Xin Long (2):
net: move the hsize check to the else block in skb_segment
udp: remove CRC flag from dev features in __skb_udp_tunnel_segment
net/core/skbuff.c |
Signed-off-by: Xin Long
---
net/ipv4/udp_offload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index ff39e94..1168d18 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -68,8 +68,8 @@ static struct
< 0" into else block, to save some cycles, as Alex suggested.
Signed-off-by: Xin Long
---
net/core/skbuff.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 6039069..e835193 100644
--- a/net/core/skbuff.c
+++ b/net/core/
Please drop this patchset, the second one is incorrect.
I will post v3, thanks.
On Fri, Jan 15, 2021 at 4:21 PM Xin Long wrote:
>
> Patch 1/2 is to improve the code in skb_segment(), and it is needed
> by Patch 2/2.
>
> v1->v2:
> - see Patch 1/2.
>
> Xin Long (2):
&g
< 0" into else block, to save some cycles, as Alex suggested.
Signed-off-by: Xin Long
---
net/core/skbuff.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 6039069..e835193 100644
--- a/net/core/skbuff.c
+++ b/net/core/
It makes more sense to clear NETIF_F_SG instead of set it when
calling skb_segment() in sctp_gso_segment(), since SCTP GSO is
using head_skb's fraglist, of which all frags are linear skbs.
This will make SCTP GSO code more understandable.
Suggested-by: Alexander Duyck
Signed-off-by: Xin
Patch 1/2 is to improve the code in skb_segment(), and it is needed
by Patch 2/2.
v1->v2:
- see Patch 1/2.
v2->v3:
- change Patch 2/2 to the right patch.
Xin Long (2):
net: move the hsize check to the else block in skb_segment
sctp: remove the NETIF_F_SG flag before calling skb_s
this patch is to add it for vxlan.
Signed-off-by: Xin Long
---
drivers/net/vxlan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index b936443..3929e43 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3283,12 +3283,13
Like GRE device, UDP tunnel devices should also support fraglist, so
that some protocol (like SCTP) HW GSO that requires NETIF_F_FRAGLIST
in the dev can work. Especially when the lower device support both
NETIF_F_GSO_UDP_TUNNEL and NETIF_F_GSO_SCTP.
Xin Long (3):
vxlan: add NETIF_F_FRAGLIST
this patch is to add it for geneve.
Signed-off-by: Xin Long
---
drivers/net/geneve.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 6aa775d..4ac0373 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1197,11
Like vxlan and geneve, bareudp also needs this dev feature
to support some protocol's HW GSO.
Signed-off-by: Xin Long
---
drivers/net/bareudp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index 57dfaf4..7511bca 1
Currently, udp v6 socket can not process v4 packets with UDP GRO, as
udp_encap_needed_key is not increased when udp_tunnel_encap_enable()
is called for v6 socket. This patchset is to increase it and remove
the unnecessary code in bareudp.
v1->v2:
- see Patch 1/2.
v2->v3:
- see Patch 2/2
, and correspondingly
decrease udp_encap_needed_key in udpv6_destroy_sock().
v1->v2:
- add udp_encap_disable() and export it.
Signed-off-by: Xin Long
---
include/net/udp.h| 1 +
include/net/udp_tunnel.h | 3 +--
net/ipv4/udp.c | 6 ++
net/ipv6/udp.c | 4 +++-
4 files cha
As udp_encap_enable() is already called in udp_tunnel_encap_enable()
since the last patch, and we don't need it any more. So remove it by
reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d.
v1->v2:
- no change.
v2->v3:
- add the missing signoff.
Signed-off-by: Xin Long
---
can still leave CRC checksum
of SCTP to HW by not clearing this CRC flag if it's supported, as
Jakub and Alex noticed.
v1->v2:
- improve the changelog.
- fix "rev xmas tree" in varibles declaration.
v2->v3:
- remove CRC flag from dev features only when need_csum is true
e CRC flag from dev features when
need_csum is false.
Signed-off-by: Xin Long
---
net/ipv4/udp_offload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index ff39e94..1168d18 100644
--- a/net/ipv4/udp_offload.c
+++
This patchset introduces inline function skb_csum_is_sctp(), and uses it
to validate it's a sctp CRC csum offload packet, to make SCTP CRC csum
offload for tunneling packets supported in some HW drivers.
Xin Long (6):
net: add inline function skb_csum_is_sctp
net: igb: use skb_csum_is
This patch is to define a inline function skb_csum_is_sctp(), and
also replace all places where it checks if it's a SCTP CSUM skb.
This function would be used later in many networking drivers in
the following patches.
Suggested-by: Alexander Duyck
Signed-off-by: Xin Long
---
driver
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC
checksum offload packet, and yet it also makes igbvf support SCTP
CRC checksum offload for UDP and GRE encapped packets, just as it
does in igb driver.
Signed-off-by: Xin Long
---
drivers/net/ethernet/intel/igbvf/netdev.c
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC
checksum offload packet, and yet it also makes igc support SCTP
CRC checksum offload for UDP and GRE encapped packets, just as it
does in igb driver.
Signed-off-by: Xin Long
---
drivers/net/ethernet/intel/igc/igc_main.c
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC
checksum offload packet, and yet it also makes ixgbevf support SCTP
CRC checksum offload for UDP and GRE encapped packets, just as it
does in igb driver.
Signed-off-by: Xin Long
---
drivers/net/ethernet/intel/ix
E encapped packets.
Signed-off-by: Xin Long
---
drivers/net/ethernet/intel/igb/igb_main.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
b/drivers/net/ethernet/intel/igb/igb_main.c
index 03f78fd..8757ad0 100644
--- a/d
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC
checksum offload packet, and yet it also makes ixgbe support SCTP
CRC checksum offload for UDP and GRE encapped packets, just as it
does in igb driver.
Signed-off-by: Xin Long
---
drivers/net/ethernet/intel/ixgbe/ixgbe_m
d with 'len'.
>
> v1 -> v2:
> - reorder hsize checks instead of explicit cast (Alex)
>
> Bisected-by: Matthieu Baerts
> Fixes: dbd50f238dec ("net: move the hsize check to the else block in
> skb_segment")
> Signed-off-by: Paolo Abeni
Reviewed-by: Xi
On Wed, Jan 20, 2021 at 6:17 AM Alexander Duyck
wrote:
>
> On Fri, Jan 15, 2021 at 8:34 PM Xin Long wrote:
> >
> > When enabling encap for a ipv6 socket without udp_encap_needed_key
> > increased, UDP GRO won't work for v4 mapped v6 address packets as
> >
s to extend the
csum_not_inet/csum_type of sk_buff in Patch 1/3, and define new
type of CSUM_T_IP_GENERIC to get ip generic checksum processed
in skb_csum_hwoffload_help() in Patch 2/3, then implement it on
TX path and GSO path in Patch 3/3.
Xin Long (3):
net: rename csum_not_inet to csum_
e, it
will do csum for outer proto by calling gso_make_checksum().
Note that SCTP has to do the csum by itself for non GSO path in
sctp_packet_pack(), as gre_build_header() can't handle the csum
with CHECKSUM_PARTIAL set for SCTP CRC csum offload.
Signed-off-by: Xin Long
---
include
This patch is to rename csum_not_inet to csum_type, as later
more csum type would be introduced in the next patch.
Signed-off-by: Xin Long
---
include/linux/skbuff.h | 19 +++
net/core/dev.c | 2 +-
net/sched/act_csum.c | 2 +-
net/sctp/offload.c | 2 +-
net
This patch is to extend csum_type field to 2 bits, and introduce
CSUM_T_IP_GENERIC csum type, and add the support for this in
skb_csum_hwoffload_help(), just like CSUM_T_SCTP_CRC.
Note here it moves dst_pending_confirm field below ndisc_nodetype
to avoid a memory hole.
Signed-off-by: Xin Long
On Fri, Jan 22, 2021 at 10:50 AM Jakub Kicinski wrote:
>
> On Thu, 21 Jan 2021 16:45:36 +0800 Xin Long wrote:
> > This patch is to rename csum_not_inet to csum_type, as later
> > more csum type would be introduced in the next patch.
> >
> > Signed-off-by: Xin
On Fri, Jan 22, 2021 at 2:13 AM Alexander Duyck
wrote:
>
> On Thu, Jan 21, 2021 at 12:46 AM Xin Long wrote:
> >
> > This patch is to extend csum_type field to 2 bits, and introduce
> > CSUM_T_IP_GENERIC csum type, and add the support for this in
> > skb_cs
Commit fa8211701043 ("net: add inline function skb_csum_is_sctp")
missed replacing skb->csum_not_inet check in hns3. This patch is
to replace it with skb_csum_is_sctp().
Reported-by: Jakub Kicinski
Signed-off-by: Xin Long
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c |
ipproto 4
# ethtool -K eth1 rx-gro-list on
Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection")
Reported-by: Guillaume Nault
Signed-off-by: Xin Long
---
net/ipv4/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
in
On Thu, Nov 19, 2020 at 12:44 AM Jakub Kicinski wrote:
>
> On Wed, 18 Nov 2020 14:14:49 +0800 Xin Long wrote:
> > On Wed, Nov 18, 2020 at 8:29 AM Jakub Kicinski wrote:
> > > On Mon, 16 Nov 2020 17:15:47 +0800 Xin Long wrote:
> > > > This patch is to
On Thu, Nov 19, 2020 at 4:35 AM Alexander Duyck
wrote:
>
> On Mon, Nov 16, 2020 at 1:17 AM Xin Long wrote:
> >
> > This patch is to let it always do CRC checksum in sctp_gso_segment()
> > by removing CRC flag from the dev features in gre_gso_segment() for
> > SCT
On Fri, Nov 20, 2020 at 1:24 AM Alexander Duyck
wrote:
>
> On Wed, Nov 18, 2020 at 9:53 PM Xin Long wrote:
> >
> > On Thu, Nov 19, 2020 at 4:35 AM Alexander Duyck
> > wrote:
> > >
> > > On Mon, Nov 16, 2020 at 1:17 AM Xin Long wrote:
> > &
On Sat, Nov 21, 2020 at 12:10 AM Alexander Duyck
wrote:
>
> On Fri, Nov 20, 2020 at 2:23 AM Xin Long wrote:
> >
> > On Fri, Nov 20, 2020 at 1:24 AM Alexander Duyck
> > wrote:
> > >
> > > On Wed, Nov 18, 2020 at 9:53 PM Xin Long wrote:
> > >
On Tue, Nov 24, 2020 at 6:23 AM Alexander Duyck
wrote:
>
> On Mon, Nov 23, 2020 at 1:14 AM Xin Long wrote:
> >
> > On Sat, Nov 21, 2020 at 12:10 AM Alexander Duyck
> > wrote:
> > >
> > > On Fri, Nov 20, 2020 at 2:23 AM Xin Long wrote:
> > >
2 ("sctp: Fix a race between ICMP protocol unreachable and
connect()")
Reported-by: Hangbin Liu
Signed-off-by: Xin Long
---
net/sctp/input.c | 4 ++--
net/sctp/sm_sideeffect.c | 2 +-
net/sctp/transport.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git
- Also use sctp_transport_put() for the "out_unlock:" path in
sctp_generate_proto_unreach_event(), as Marcelo noticed.
Fixes: 50b5d6ad6382 ("sctp: Fix a race between ICMP protocol unreachable and
connect()")
Reported-by: Hangbin Liu
Signed-off-by: Xin Long
---
net/sctp/inp
On Fri, Nov 13, 2020 at 8:35 PM Marcelo Ricardo Leitner
wrote:
>
> Hi,
>
> On Fri, Nov 13, 2020 at 05:18:24PM +0800, Xin Long wrote:
> ...
> > diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> > index 813d307..0a51150 100644
> > --- a/net/sctp/s
csum_start in GSO CB properly in sctp_gso_segment()
after that commit, so it would do checksum with gso_make_checksum()
in gre_gso_segment(), and Commit 622e32b7d4a6 ("net: gre: recompute
gre csum for sctp over gre tunnels") can be reverted now.
Signed-off-by: Xin Long
---
net/ipv
On Wed, Nov 18, 2020 at 8:29 AM Jakub Kicinski wrote:
>
> On Mon, 16 Nov 2020 17:15:47 +0800 Xin Long wrote:
> > This patch is to let it always do CRC checksum in sctp_gso_segment()
> > by removing CRC flag from the dev features in gre_gso_segment() for
> > SCTP over
Currently, udp v6 socket can not process v4 packets with UDP GRO, as
udp_encap_needed_key is not increased when udp_tunnel_encap_enable()
is called for v6 socket. This patchset is to increase it and remove
the unnecessary code in bareudp.
Xin Long (2):
udp: call udp_encap_enable for v6 sockets
, and correspondingly
decrease udp_encap_needed_key in udpv6_destroy_sock().
Reported-by: Chen Yi
Signed-off-by: Xin Long
---
include/net/udp_tunnel.h | 3 +--
net/ipv6/udp.c | 4 +++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
As udp_encap_enable() is already called in udp_tunnel_encap_enable()
since the last patch, and we don't need it any more. So remove it by
reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d.
---
drivers/net/bareudp.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/net/bareud
go to
frag_list processing code.
So the right thing to do is move the hsize check to the else block, so
that it won't affect the !hsize check for frag_list processing.
Signed-off-by: Xin Long
---
net/core/skbuff.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net
Patch 1/2 is to improve the code in skb_segment(), and it is needed
by Patch 2/2.
Xin Long (2):
net: move the hsize check to the else block in skb_segment
sctp: remove the NETIF_F_SG flag before calling skb_segment
net/core/skbuff.c | 5 +++--
net/sctp/offload.c | 2 +-
2 files changed, 4
It makes more sense to clear NETIF_F_SG instead of set it when
calling skb_segment() in sctp_gso_segment(), since SCTP GSO is
using head_skb's fraglist, of which all frags are linear skbs.
This will make SCTP GSO code more understandable.
Suggested-by: Alexander Duyck
Signed-off-by: Xin
only handle the SCTP CRC
when it's in the outer packet, not in the inner packet like in this
case, so here it removes CRC flag from the dev features even when
need_csum is false.
v1->v2:
- improve the changelog.
- fix "rev xmas tree" in varibles declaration.
Signed-off-by: Xin
On Tue, Jan 12, 2021 at 12:48 AM Alexander Duyck
wrote:
>
> On Mon, Jan 11, 2021 at 5:22 AM Xin Long wrote:
> >
> > This patch is to let it always do CRC checksum in sctp_gso_segment()
> > by removing CRC flag from the dev features in gre_gso_segment() for
> > SCT
On Tue, Jan 12, 2021 at 12:26 AM Alexander Duyck
wrote:
>
> On Mon, Jan 11, 2021 at 4:45 AM Xin Long wrote:
> >
> > After commit 89319d3801d1 ("net: Add frag_list support to skb_segment"),
> > it goes to process frag_list when !hsize in skb_segment(). However
On Tue, Jan 12, 2021 at 2:02 AM kernel test robot wrote:
>
> Hi Xin,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on net-next/master]
>
> url:
> https://github.com/0day-ci/linux/commits/Xin-Long/net-enable-udp-v6-sockets-receiv
97...@syzkaller.appspotmail.com
> Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options")
> Fixes: 79b1011cb33d ("net: sched: allow flower to match erspan options")
> Cc: Pieter Jansen van Vuuren
> Cc: Jamal Hadi Salim
> Cc: Xin Long
> Cc: Jiri Pirko
On Fri, Oct 16, 2020 at 3:08 PM Xin Long wrote:
>
> On Fri, Oct 16, 2020 at 1:42 AM Marcelo Ricardo Leitner
> wrote:
> >
> > Actually..
> >
> > On Tue, Oct 13, 2020 at 03:27:41PM +0800, Xin Long wrote:
> > ...
> > > Also add sysctl udp_port to a
check encap_type in __udp_lib_err() for the
further validation for a encap sock.
Signed-off-by: Xin Long
---
net/ipv4/udp.c | 2 +-
net/ipv6/udp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 09f0a23..ca04a8a 100644
--- a/net/ipv4
16 type cast warning in patch 8.
- fix the wrong endian orders when setting values in 14,16.
v3->v4:
- add entries in ip-sysctl.rst in patch 7,16, as Marcelo Suggested.
- not create udp socks when udp_port is set to 0 in patch 16, as
Marcelo noticed.
Xin Long (16):
udp: check udp sock encap_
t patch of
this patchset when enabling this feature.
v1->v2:
- Add pr_err() when fails to create udp v4 sock.
v2->v3:
- Add 'select NET_UDP_TUNNEL' in sctp Kconfig.
Signed-off-by: Xin Long
---
include/net/netns/sctp.h | 5 +
include/net/sctp/constants.h | 2 ++
include/ne
' encap_port by sysctl.
v1->v2:
- Change to define encap_port as __be16 for sctp_sock, asoc and
transport.
v2->v3:
- No change.
v3->v4:
- Add 'encap_port' entry in ip-sysctl.rst.
Signed-off-by: Xin Long
---
Documentation/networking/ip-sysctl.rst | 9 +
incl
responding asoc and transport exist.
Note that icmp packet process for sctp over udp is done by udp sock
.encap_err_lookup(), and it means for now we can't do as much as
sctp_v4/6_err() does. Also we can't do the two mappings mentioned
in rfc6951#section-5.5.
Signed-off-by: Xin
e issue, it
will be used in xmit path in the next patch.
Signed-off-by: Xin Long
---
include/net/sctp/sctp.h| 7 +--
include/net/sctp/structs.h | 1 +
net/sctp/socket.c | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/net/sctp/sctp.h b/include/net/
- Add pr_err() when fails to create udp v6 sock.
- Add #if IS_ENABLED(CONFIG_IPV6) not to create v6 sock when ipv6 is
disabled.
Signed-off-by: Xin Long
---
include/net/netns/sctp.h | 1 +
net/sctp/protocol.c | 26 ++
2 files changed, 27 insertions(+)
diff --
unnel processing,
the same as udp4_ufo_fragment() does.
v1->v2:
- no change.
v2->v3:
- not do any cleanup.
Signed-off-by: Xin Long
Acked-by: Willem de Bruijn
---
net/ipv6/udp_offload.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/udp_offload.c b/
h this one.
v1->v2:
- no change.
v2->v3:
- remove the he NETIF_F_SCTP_CRC flag from the features.
- set csum and csum_start in sctp_gso_make_checksum().
Signed-off-by: Xin Long
---
net/ipv4/udp_offload.c | 3 +++
net/sctp/offload.c | 6 +-
2 files changed, 8 insertions(+), 1 d
transport can be changed by users,
which also means it allows the different transports of the same asoc
to have different encap_port value.
v1->v2:
- no change.
v2->v3:
- fix the endian warning when setting values between encap_port and
sue_port.
Signed-off-by: Xin Long
---
includ
er is removed, as it's not used any more
in sctp.
v1->v2:
- Change encap_port as __be16 for sctp_input_cb.
Signed-off-by: Xin Long
---
include/net/sctp/sm.h | 1 +
include/net/sctp/structs.h | 7 +--
net/sctp/ipv6.c| 1 +
net/sctp/protocol.c| 11 +
as "the UDP checksum SHOULD be
computed for IPv4 and IPv6", says in rfc6951#section-5.3.
v1->v2:
- Use sp->udp_port instead in sctp_v4_xmit(), which is more safe.
Signed-off-by: Xin Long
---
net/sctp/output.c | 9 +++--
net/sctp/protocol.c | 41 +
by RFC.
v1->v2:
- Use sp->udp_port instead in sctp_v6_xmit(), which is more safe.
Signed-off-by: Xin Long
---
net/sctp/ipv6.c | 43 ---
1 file changed, 32 insertions(+), 11 deletions(-)
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index a064bf2.
off-by: Xin Long
---
include/linux/sctp.h | 20
include/net/sctp/sm.h| 3 +++
net/sctp/sm_make_chunk.c | 20
3 files changed, 43 insertions(+)
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 7673123..bb19265 100644
--- a/include
e tied to gso, so move it out of gso part and
before sctp_packet_pack().
Signed-off-by: Xin Long
---
net/sctp/output.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 1441eaf..fb16500 100644
--- a/net/sctp/output.
This is from Section 4 of draft-tuexen-tsvwg-sctp-udp-encaps-cons-03,
and it requires responding with an abort chunk with an error cause
when the udp source port of the received init chunk doesn't match the
encap port of the transport.
Signed-off-by: Xin Long
---
net/sctp/sm_statefuns.c
l.rst.
Signed-off-by: Xin Long
---
Documentation/networking/ip-sysctl.rst | 6
net/sctp/protocol.c| 5
net/sctp/sysctl.c | 52 ++
3 files changed, 63 insertions(+)
diff --git a/Documentation/networking/ip
1 - 100 of 1692 matches
Mail list logo