[PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port

2018-11-22 Thread Hangbin Liu
team_notify_peers() and team_mcast_rejoin() in team_port_disable(). Reported-by: Liang Li Fixes: fc423ff00df3a ("team: add peer notification") Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins") Signed-off-by: Hangbin Liu --- drivers/net/team/team.c |

[PATCH net] net/ipv6: re-do dad when interface has IFF_NOARP flag change

2018-11-21 Thread Hangbin Liu
-doing dad when interface changed IFF_NOARP flag. Then we will add corresponding mcast group and check if there is a duplicate address on the network. Reported-by: Jianlin Shi Reviewed-by: Stefano Brivio Signed-off-by: Hangbin Liu --- net/ipv6/addrconf.c | 19 +-- 1 file changed, 13

Re: [PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-11-20 Thread Hangbin Liu
On Wed, Nov 14, 2018 at 10:37:31AM +0800, Hangbin Liu wrote: > On Thu, Nov 08, 2018 at 03:44:10PM +0800, Hangbin Liu wrote: > > On Fri, Oct 26, 2018 at 10:30:54AM +0800, Hangbin Liu wrote: > > > Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we > >

Re: [PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-11-13 Thread Hangbin Liu
On Thu, Nov 08, 2018 at 03:44:10PM +0800, Hangbin Liu wrote: > On Fri, Oct 26, 2018 at 10:30:54AM +0800, Hangbin Liu wrote: > > Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we > > change sysctl_mld_qrv after interface up, it will has no effect. > > &g

Re: [PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-11-07 Thread Hangbin Liu
On Fri, Oct 26, 2018 at 10:30:54AM +0800, Hangbin Liu wrote: > Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we > change sysctl_mld_qrv after interface up, it will has no effect. > > Fix it by assigning latest sysctl_mld_qrv to idev mc_qrv when join new group. &

[PATCH net] ipv4/igmp: fix v1/v2 switchback timeout based on rfc3376, 8.12

2018-10-25 Thread Hangbin Liu
en receive IGMPv3 queries. Reported-by: Ying Xu Signed-off-by: Hangbin Liu --- include/linux/inetdevice.h | 4 +++- net/ipv4/igmp.c| 53 +++--- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/include/linux/inetdevice.h b/inc

[PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-10-25 Thread Hangbin Liu
Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we change sysctl_mld_qrv after interface up, it will has no effect. Fix it by assigning latest sysctl_mld_qrv to idev mc_qrv when join new group. Reported-by: Ying Xu Signed-off-by: Hangbin Liu --- net/ipv6/mcast.c | 1 + 1

[PATCH net] bridge: do not add port to router list when receives query with source 0.0.0.0

2018-10-25 Thread Hangbin Liu
the source address is not 0.0.0.0. We should not add the port to router list when receives query with source 0.0.0.0. Reported-by: Ying Xu Signed-off-by: Hangbin Liu --- net/bridge/br_multicast.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/bridge/br_multicast.c

[PATCHv3 iproute2-next] ip/geneve: fix ttl inherit behavior

2018-10-22 Thread Hangbin Liu
if_link.h as it's already updated. 2) Still use addattr8() so we can enable/disable ttl inherit, as Michal suggested. v3: Update man page Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu --- ip/iplink_geneve.c| 20 +--- man/man8/ip-link.8.in | 4 +++- 2 files changed,

[PATCHv2 iproute2-next] ip/geneve: fix ttl inherit behavior

2018-10-18 Thread Hangbin Liu
if_link.h as it's already updated. 2) Still use addattr8() so we can enable/disable ttl inherit, as Michal suggested. Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu --- ip/iplink_geneve.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ip/iplink_ge

[PATCHv2 net-next] geneve: allow to clear ttl inherit

2018-09-29 Thread Hangbin Liu
: 52d0d404d39dd ("geneve: add ttl inherit support") CC: Michal Kubecek Signed-off-by: Hangbin Liu --- drivers/net/geneve.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 6625fab..82eccc9 100644 --- a/d

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
On Sat, Sep 29, 2018 at 01:46:19AM +0200, Michal Kubecek wrote: > Is it desirable to switch to a flag? If I read geneve_changelink() and > geneve_nl2info() correctly, it allows you to set the ttl_inherit flag > for an existing device but doesn't allow you to clear it. With NLA_U8, > you could

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
Hi David Ahern, On Fri, Sep 28, 2018 at 11:59:37AM -0600, David Ahern wrote: > On 9/27/18 7:09 PM, Hangbin Liu wrote: > > Phil pointed out that there is a mismatch between vxlan and geneve ttl > > inherit. We should define it as a flag and use nla_put_flag to export this > > o

Re: [PATCH net-next] geneve: fix ttl inherit type

2018-09-29 Thread Hangbin Liu
On Sat, Sep 29, 2018 at 01:46:19AM +0200, Michal Kubecek wrote: > On Fri, Sep 28, 2018 at 09:09:58AM +0800, Hangbin Liu wrote: > > Phil pointed out that there is a mismatch between vxlan and geneve ttl > > inherit. We should define it as a flag and use nla_put_flag to export

Re: [PATCH net] vxlan: use nla_put_flag for ttl inherit

2018-09-29 Thread Hangbin Liu
On Fri, Sep 28, 2018 at 11:56:10AM -0600, David Ahern wrote: > On 9/28/18 6:38 AM, Hangbin Liu wrote: > > On Fri, Sep 28, 2018 at 12:37:00PM +0200, Phil Sutter wrote: > >> On Fri, Sep 28, 2018 at 09:08:26AM +0800, Hangbin Liu wrote: > >>> Phil pointed out that the

Re: [PATCH net] vxlan: use nla_put_flag for ttl inherit

2018-09-28 Thread Hangbin Liu
On Fri, Sep 28, 2018 at 12:37:00PM +0200, Phil Sutter wrote: > On Fri, Sep 28, 2018 at 09:08:26AM +0800, Hangbin Liu wrote: > > Phil pointed out that there is a mismatch between vxlan and geneve ttl > > inherit. > > We should define it as a flag and use nla_put_flag to expor

[PATCH net-next] geneve: fix ttl inherit type

2018-09-27 Thread Hangbin Liu
Phil pointed out that there is a mismatch between vxlan and geneve ttl inherit. We should define it as a flag and use nla_put_flag to export this opiton. Fixes: 52d0d404d39dd ("geneve: add ttl inherit support") Reported-by: Phil Sutter Signed-off-by: Hangbin Liu --- drivers/net/ge

[PATCH net] vxlan: use nla_put_flag for ttl inherit

2018-09-27 Thread Hangbin Liu
Phil pointed out that there is a mismatch between vxlan and geneve ttl inherit. We should define it as a flag and use nla_put_flag to export this opiton. Fixes: 8fd780698745b ("vxlan: fill ttl inherit info") Reported-by: Phil Sutter Signed-off-by: Hangbin Liu --- drivers/net/v

Re: [PATCH iproute2-next] geneve: fix ttl inherit behavior

2018-09-27 Thread Hangbin Liu
On Thu, Sep 27, 2018 at 11:08:36AM +0200, Phil Sutter wrote: > On Thu, Sep 27, 2018 at 03:27:37PM +0800, Hangbin Liu wrote: > > Currently when we add geneve with "ttl inherit", we set ttl to 0, which > > is actually use whatever default value instead of inherit the inner

Re: [PATCH iproute2] vxlan: show correct ttl inherit info

2018-09-27 Thread Hangbin Liu
On Thu, Sep 27, 2018 at 11:27:45AM +0200, Phil Sutter wrote: > Hi Hangbin, > > On Thu, Sep 27, 2018 at 03:28:36PM +0800, Hangbin Liu wrote: > > We should only show ttl inherit when IFLA_VXLAN_TTL_INHERIT supplied. > > Otherwise show the ttl number, or auto when it is 0

[PATCH iproute2] vxlan: show correct ttl inherit info

2018-09-27 Thread Hangbin Liu
We should only show ttl inherit when IFLA_VXLAN_TTL_INHERIT supplied. Otherwise show the ttl number, or auto when it is 0. Signed-off-by: Hangbin Liu --- ip/iplink_vxlan.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c

[PATCH iproute2-next] geneve: fix ttl inherit behavior

2018-09-27 Thread Hangbin Liu
attribute IFLA_GENEVE_TTL_INHERIT in kernel commit 52d0d404d39dd ("geneve: add ttl inherit support"). Now let's use "ttl inherit" to inherit the inner protocol's ttl, and use "ttl auto" to means "use whatever default value", the same behavior with ttl == 0. Reported-by: Jia

[PATCH net] vxlan: fill ttl inherit info

2018-09-25 Thread Hangbin Liu
When add vxlan ttl inherit support, I forgot to fill it when dump vlxan info. Fix it now. Fixes: 72f6d71e491e6 ("vxlan: add ttl inherit support") Signed-off-by: Hangbin Liu --- drivers/net/vxlan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/n

Re: [PATCH net] VSOCK: check sk state before receive

2018-09-22 Thread Hangbin Liu
On Fri, Sep 21, 2018 at 07:48:25AM +, Jorgen S. Hansen wrote: > Hi Hangbin, > > I finaly got to the bottom of this - the issue was indeed in the VMCI driver. > The patch is posted here: > > https://lkml.org/lkml/2018/9/21/326 > > I used your reproduce.log to test the fix. Thanks for

[PATCH iproute2-next] iplink: add ipvtap support

2018-09-18 Thread Hangbin Liu
IPVLAN and IPVTAP are using the same functions and parameters. So we can just add a new link_util with id ipvtap. Others are the same. Signed-off-by: Hangbin Liu --- ip/iplink.c | 4 ++-- ip/iplink_ipvlan.c| 28 ++-- man/man8/ip-link.8.in | 4 3

[PATCH iproute2] iplink: fix incorrect any address handling for ip tunnels

2018-09-18 Thread Hangbin Liu
ily when call get_addr() Reported-by: Jianlin Shi Fixes: d42c7891d26e4 ("utils: Do not reset family for default, any, all addresses") Signed-off-by: Hangbin Liu --- ip/link_gre.c| 4 ++-- ip/link_gre6.c | 4 ++-- ip/link_ip6tnl.c | 4 ++-- ip/link_iptnl.c | 4 ++-- ip/link_vti.c|

[PATCH net] geneve: add ttl inherit support

2018-09-11 Thread Hangbin Liu
t support. Reported-by: Jianlin Shi Suggested-by: Jiri Benc Signed-off-by: Hangbin Liu --- drivers/net/geneve.c | 41 ++ include/uapi/linux/if_link.h | 1 + tools/include/uapi/linux/if_link.h | 1 + 3 files changed, 35 insertions(+), 8 dele

[PATCHv4 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Hangbin Liu
: No need to use is_json_context() as print_string() could handle both cases. v4: use new function print_nl() to print new line in non-json mode. Reported-by: Ying Xu Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library") Signed-off-by: Hangbin Liu --- bridge/mdb.c | 6

[PATCHv3 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-11 Thread Hangbin Liu
: No need to use is_json_context() as Phil pointed out. Reported-by: Ying Xu Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library") Signed-off-by: Hangbin Liu --- bridge/mdb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/bridge/mdb.c b/bridge/mdb.c ind

Re: [PATCH net] ipv6: use rt6_info members when dst is set in rt6_fill_node

2018-09-10 Thread Hangbin Liu
Hi David, On Mon, Sep 10, 2018 at 08:39:34PM -0600, David Ahern wrote: > On 9/10/18 7:04 PM, Hangbin Liu wrote: > > > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > > index 18e00ce..62621b4 100644 > > --- a/net/ipv6/route.c > > +++ b/net/ipv6/route.c > &

[PATCHv2 iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-10 Thread Hangbin Liu
. Reported-by: Ying Xu Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library") Signed-off-by: Hangbin Liu --- bridge/mdb.c | 8 1 file changed, 8 insertions(+) diff --git a/bridge/mdb.c b/bridge/mdb.c index f38dc67..408117d 100644 --- a/bridge/mdb.c +++ b/br

Re: [PATCH net] ipv6: use rt6_info members when dst is set in rt6_fill_node

2018-09-10 Thread Hangbin Liu
On Mon, Sep 10, 2018 at 01:07:11PM -0600, David Ahern wrote: > On 9/10/18 11:55 AM, Xin Long wrote: > > On Tue, Sep 11, 2018 at 12:13 AM David Ahern > > wrote: > >> > >> On 9/9/18 12:29 AM, Xin Long wrote: > > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > > index 18e00ce..e554922

Re: [PATCH iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-06 Thread Hangbin Liu
Hi Stephen, On Thu, Sep 06, 2018 at 02:00:53PM +0100, Stephen Hemminger wrote: > > @@ -164,6 +168,10 @@ static void print_mdb_entry(FILE *f, int ifindex, > > const struct br_mdb_entry *e, > > print_string(PRINT_ANY, "timer", " %s", > > format_timer(timer)); >

[PATCH net] net/ipv6: fix incorrect fib6 gateway info after do redirect

2018-09-06 Thread Hangbin Liu
() get gateway info from fib6_info. Fixes: 23fb93a4d3f11 ("net/ipv6: Cleanup exception and cache route handling") Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu --- net/ipv6/route.c | 4 1 file changed, 4 insertions(+) diff --git a/net/ipv6/route.c b/net/ipv6/route.c ind

[PATCH iproute2] bridge/mdb: fix missing new line when show bridge mdb

2018-09-04 Thread Hangbin Liu
ridge: colorize output and use JSON print library") Signed-off-by: Hangbin Liu --- bridge/mdb.c | 8 1 file changed, 8 insertions(+) diff --git a/bridge/mdb.c b/bridge/mdb.c index f38dc67..d89c065 100644 --- a/bridge/mdb.c +++ b/bridge/mdb.c @@ -107,6 +107,10 @@ s

[PATCH net] ip6_tunnel: respect ttl inherit for ip6tnl

2018-08-31 Thread Hangbin Liu
man ip-tunnel ttl section says: 0 is a special value meaning that packets inherit the TTL value. IPv4 tunnel respect this in ip_tunnel_xmit(), but IPv6 tunnel has not implement it yet. To make IPv6 behave consistently with IP tunnel, add ipv6 tunnel inherit support. Signed-off-by: Hangbin Liu

Re: [PATCH net 0/2] igmp: fix two incorrect unsolicit report count issues

2018-08-29 Thread Hangbin Liu
Opps, sent two duplicate mails by mistake. Please ignore the duplicate messages. Sorry. On Wed, Aug 29, 2018 at 06:06:07PM +0800, Hangbin Liu wrote: > Just like the subject, fix two minor igmp unsolicit report count issues. > > Hangbin Liu (2): > igmp: fix incorrect unsolicit repor

[PATCH net 1/2] igmp: fix incorrect unsolicit report count when join group

2018-08-29 Thread Hangbin Liu
We should not start timer if im->unsolicit_count equal to 0 after decrease. Or we will send one more unsolicit report message. i.e. 3 instead of 2 by default. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Hangbin Liu --- net/ipv4/igmp.c | 5 ++--- 1 file changed, 2 ins

[PATCH net 1/2] igmp: fix incorrect unsolicit report count when join group

2018-08-29 Thread Hangbin Liu
We should not start timer if im->unsolicit_count equal to 0 after decrease. Or we will send one more unsolicit report message. i.e. 3 instead of 2 by default. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Hangbin Liu --- net/ipv4/igmp.c | 5 ++--- 1 file changed, 2 ins

[PATCH net 2/2] igmp: fix incorrect unsolicit report count after link down and up

2018-08-29 Thread Hangbin Liu
value. Fixes: 24803f38a5c0b ("igmp: do not remove igmp souce list info when set link down") Signed-off-by: Hangbin Liu --- net/ipv4/igmp.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index deb1f82..4da3944 100644 --- a

[PATCH net 2/2] igmp: fix incorrect unsolicit report count after link down and up

2018-08-29 Thread Hangbin Liu
value. Fixes: 24803f38a5c0b ("igmp: do not remove igmp souce list info when set link down") Signed-off-by: Hangbin Liu --- net/ipv4/igmp.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index deb1f82..4da3944 100644 --- a

[PATCH net 0/2] igmp: fix two incorrect unsolicit report count issues

2018-08-29 Thread Hangbin Liu
Just like the subject, fix two minor igmp unsolicit report count issues. Hangbin Liu (2): igmp: fix incorrect unsolicit report count when join group igmp: fix incorrect unsolicit report count after link down and up net/ipv4/igmp.c | 11 --- 1 file changed, 4 insertions(+), 7

[PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input

2018-08-22 Thread Hangbin Liu
to data path") Signed-off-by: Hangbin Liu --- net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 7208c16..c4ea13e 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -956,7 +956,7 @@ static void ip6_rt_init_dst(s

[PATCH net] cls_matchall: fix tcf_unbind_filter missing

2018-08-14 Thread Hangbin Liu
Fix tcf_unbind_filter missing in cls_matchall as this will trigger WARN_ON() in cbq_destroy_class(). Fixes: fd62d9f5c575f ("net/sched: matchall: Fix configuration race") Reported-by: Li Shuang Signed-off-by: Hangbin Liu --- net/sched/cls_matchall.c | 2 ++ 1 file changed, 2 insertion

[PATCH net 0/2] net_sched: Fix two tc_index filter init issues

2018-08-13 Thread Hangbin Liu
These two patches fix two tc_index filter init issues. The first one fixes missing exts info in new filter, which will cause NULL pointer dereference when delete tcindex filter. The second one fixes missing res info when create new filter, which will make filter unbind failed. Hangbin Liu (2

[PATCH net 1/2] net_sched: fix NULL pointer dereference when delete tcindex filter

2018-08-13 Thread Hangbin Liu
t; as there is no errout after that. Fixes: bf63ac73b3e13 ("net_sched: fix an oops in tcindex filter") Reported-by: Li Shuang Signed-off-by: Hangbin Liu --- net/sched/cls_tcindex.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/sched/cls_tcindex.c b/net/sched/

[PATCH net 2/2] net_sched: Fix missing res info when create new tc_index filter

2018-08-13 Thread Hangbin Liu
troy_class(). Fix it by updating f->result.res when create new filter. Fixes: 6e0565697a106 ("net_sched: fix another crash in cls_tcindex") Reported-by: Li Shuang Signed-off-by: Hangbin Liu --- net/sched/cls_tcindex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/

[PATCH net] multicast: remove useless parameter for group add

2018-07-20 Thread Hangbin Liu
Remove the mode parameter for igmp/igmp6_group_added as we can get it from first parameter. Fixes: 6e2059b53f988 (ipv4/igmp: init group mode as INCLUDE when join source group) Fixes: c7ea20c9da5b9 (ipv6/mcast: init as INCLUDE when join SSM INCLUDE group) Signed-off-by: Hangbin Liu --- net/ipv4

[PATCH net] multicast: do not restore deleted record source filter mode to new one

2018-07-20 Thread Hangbin Liu
xes: 1666d49e1d416 (mld: do not remove mld souce list info when set link down) Signed-off-by: Hangbin Liu --- net/ipv4/igmp.c | 3 +-- net/ipv6/mcast.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index b3c899a..28fef7d 100644 --- a/net/i

[PATCHv2 net 0/2] multicast: init as INCLUDE when join SSM INCLUDE group

2018-07-10 Thread Hangbin Liu
separated patches for IPv4 and IPv6. Test: test by myself and customer. Hangbin Liu (2): ipv4/igmp: init group mode as INCLUDE when join source group ipv6/mcast: init as INCLUDE when join SSM INCLUDE group include/linux/igmp.h | 2 ++ include/net/ipv6.h | 2 ++ net/ipv4/igmp.c

[PATCHv2 net 1/2] ipv4/igmp: init group mode as INCLUDE when join source group

2018-07-10 Thread Hangbin Liu
ing the mode to INCLUDE for SSM JOIN_SOURCE_GROUP. I also split the original patch into two separated patches for IPv4 and IPv6. Fixes: a052517a8ff65 ("net/multicast: should not send source list records when have filter mode change") Reviewed-by: Stefano Brivio Signed-off-by: Hangb

[PATCHv2 net 2/2] ipv6/mcast: init as INCLUDE when join SSM INCLUDE group

2018-07-10 Thread Hangbin Liu
ter mode change") Reviewed-by: Stefano Brivio Signed-off-by: Hangbin Liu --- include/net/ipv6.h | 2 ++ net/ipv6/ipv6_sockglue.c | 5 ++-- net/ipv6/mcast.c | 64 ++-- 3 files changed, 50 insertions(+), 21 deletions(-) diff --gi

[PATCH net] net: mv __dev_notify_flags from void to int

2018-07-04 Thread Hangbin Liu
As call_netdevice_notifiers() and call_netdevice_notifiers_info() have return values, we should also return the values in function __dev_notify_flags(). Signed-off-by: Hangbin Liu --- include/linux/netdevice.h | 2 +- net/core/dev.c| 30 -- 2 files

[PATCHv2 net] ipvlan: call dev_change_flags when ipvlan mode is reset

2018-07-01 Thread Hangbin Liu
-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Fixes: 2ad7bf3638411 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Hangbin Liu --- drivers/net/ipvlan/ipvlan_main.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --gi

[PATCH net] ipv6: mcast: fix unsolicited report interval after receiving querys

2018-06-21 Thread Hangbin Liu
we will not call ipv6_mc_reset() after device up. This issue will be there even after leave the group and join other groups. Fixes: fc4eba58b4c14 ("ipv6: make unsolicited report intervals configurable for mld") Signed-off-by: Hangbin Liu --- net/ipv6/mcast.c | 9 ++--- 1 fi

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-20 Thread Hangbin Liu
On Wed, Jun 20, 2018 at 10:45:39AM -0700, Cong Wang wrote: > On Tue, Jun 19, 2018 at 10:31 PM, David Miller wrote: > > From: Hangbin Liu > > Date: Wed, 20 Jun 2018 11:22:54 +0800 > > > >> The only case dev_change_flags() return an err is when we change IFF_UP >

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread Hangbin Liu
On Tue, Jun 19, 2018 at 02:10:18PM -0700, Cong Wang wrote: > On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu wrote: > > @@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, > > u16 nval) > > md

[PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-18 Thread Hangbin Liu
o. Reported-by: Jianlin Shi Reviewed-by: Stefano Brivio Fixes: 2ad7bf3638411 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Hangbin Liu --- drivers/net/ipvlan/ipvlan_main.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/

Re: [PATCH net] net/multicast: clean change record if add new INCLUDE group

2018-06-15 Thread Hangbin Liu
Self NAK this patch, there is some issue I need to fix. On Wed, Jun 13, 2018 at 02:32:31PM +0800, Hangbin Liu wrote: > Based on RFC3376 5.1 and RFC3810 6.1: >If no interface >state existed for that multicast address before the change (i.e., the >change consisted of creati

[PATCH net] net/multicast: clean change record if add new INCLUDE group

2018-06-13 Thread Hangbin Liu
have filter mode change") Reviewed-by: Paolo Abeni Reviewed-by: Stefano Brivio Signed-off-by: Hangbin Liu --- include/linux/igmp.h | 2 +- include/net/ipv6.h | 2 +- net/ipv4/igmp.c | 27 ++- net/ipv4/ip_sockglue.c | 8 ++-- net/ipv6/ipv6_

Re: [PATCH net] VSOCK: check sk state before receive

2018-06-12 Thread Hangbin Liu
On Mon, Jun 04, 2018 at 04:02:39PM +, Jorgen S. Hansen wrote: > > > On May 30, 2018, at 11:17 AM, Stefan Hajnoczi wrote: > > > > On Sun, May 27, 2018 at 11:29:45PM +0800, Hangbin Liu wrote: > >> Hmm...Although I won't reproduce this bug with my reproducer afte

Re: [PATCH net] net/sched: act_simple: fix parsing of TCA_DEFDATA

2018-06-07 Thread Hangbin Liu
On Thu, Jun 07, 2018 at 03:46:43PM +0200, Davide Caratti wrote: > use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA s/TCA_DEFDATA/TCA_DEF_DATA/, incase someone search the commit history but could not find it. Thanks Hangbin

Re: [PATCH iproute2] iplink_vrf: Save device index from response for return code

2018-06-03 Thread Hangbin Liu
eed. > > Fixes: 86bf43c7c2fdc ("lib/libnetlink: update rtnl_talk to support malloc > buff at run time") > Cc: Hangbin Liu > Cc: Phil Sutter > Signed-off-by: David Ahern > --- > ip/iplink_vrf.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [PATCH net] VSOCK: check sk state before receive

2018-05-27 Thread Hangbin Liu
Hmm...Although I won't reproduce this bug with my reproducer after apply my patch. I could still get a similiar issue with syzkaller sock vnet test. It looks this patch is not complete. Here is the KASAN call trace with my patch. I can also reproduce it without my patch.

[PATCH net] VSOCK: check sk state before receive

2018-05-26 Thread Hangbin Liu
ing sk state before using it. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- net/vmw_vsock/vmci_transport.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_tra

Re: general protection fault in qdisc_hash_add

2018-05-18 Thread Hangbin Liu
On Fri, May 18, 2018 at 11:14:07AM +0200, Dmitry Vyukov wrote: > On Fri, May 18, 2018 at 10:38 AM, Hangbin Liu <liuhang...@gmail.com> wrote: > > Hi Dmitry, > > > > I got a kasan GPF error when run netlink sched test. The syzkaller log file > > and call trace att

Re: linux-next: Signed-off-by missing for commit in the net tree

2018-05-10 Thread Hangbin Liu
On Fri, May 11, 2018 at 07:17:16AM +1000, Stephen Rothwell wrote: > Hi all, > > Commit > > 0e8411e426e2 ("ipv4: reset fnhe_mtu_locked after cache route flushed") > > is missing a Signed-off-by from its author. Opps, My bad. > After route cache is flushed via ipv4_sysctl_rtcache_flush(), we

[PATCH net] ipv4: reset fnhe_mtu_locked after cache route flushed

2018-05-09 Thread Hangbin Liu
xes: d52e5a7e7ca49 ("ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu") Reported-by: Jianlin Shi <ji...@redhat.com> Reviewed-by: Stefano Brivio <sbri...@redhat.com> Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- net/ipv4/route.c | 1 + 1 file c

Re: possible deadlock in smc_close_non_accepted

2018-05-03 Thread Hangbin Liu
#syz fix: net/smc: simplify wait when closing listen socket

[PATCHv2 net] bridge: check iface upper dev when setting master via ioctl

2018-04-27 Thread Hangbin Liu
-> v2: use netdev_master_upper_dev_get() instead of netdev_has_any_upper_dev() to check if we have a master, because not all upper devs are masters, e.g. vlan device. Reported-by: syzbot+de73361ee4971b6e6...@syzkaller.appspotmail.com Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- n

Re: [PATCH net] bridge: check iface upper dev when setting master via ioctl

2018-04-26 Thread Hangbin Liu
Hi Nikolay, Thanks for the comments. On Thu, Apr 26, 2018 at 05:22:46PM +0300, Nikolay Aleksandrov wrote: > > Not all upper devs are masters. This can break some setups. Ah, like vlan device.. So how about + if (netdev_master_upper_dev_get(dev)) return -EBUSY; > > > > >

[PATCH net] bridge: check iface upper dev when setting master via ioctl

2018-04-26 Thread Hangbin Liu
. Reported-by: syzbot+de73361ee4971b6e6...@syzkaller.appspotmail.com Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- net/bridge/br_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 82c1a6f..176de8a9 100644 --- a/net/

Re: WARNING: kobject bug in br_add_if

2018-04-26 Thread Hangbin Liu
On Thu, Apr 26, 2018 at 10:04:16AM +0200, Dmitry Vyukov wrote: > On Thu, Apr 26, 2018 at 8:13 AM, Hangbin Liu <liuhang...@gmail.com> wrote: > > On Wed, Apr 11, 2018 at 05:18:23PM +0200, Dmitry Vyukov wrote: > >> On Wed, Apr 11, 2018 at 5:15 PM, syzbot > &

Re: WARNING: kobject bug in br_add_if

2018-04-26 Thread Hangbin Liu
On Wed, Apr 11, 2018 at 05:18:23PM +0200, Dmitry Vyukov wrote: > On Wed, Apr 11, 2018 at 5:15 PM, syzbot > wrote: > > Hello, > > > > syzbot hit the following crash on upstream commit > > 10b84daddbec72c6b440216a69de9a9605127f7a (Sat Mar 31

[PATCH iproute2 net-next] vxlan: add ttl auto in help message

2018-04-23 Thread Hangbin Liu
Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- ip/iplink_vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c index 661eaa7..d89b68b 100644 --- a/ip/iplink_vxlan.c +++ b/ip/iplink_vxlan.c @@ -51,7 +51,7 @@ stati

Re: [PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-18 Thread Hangbin Liu
On Wed, Apr 18, 2018 at 08:50:16AM -0700, Stephen Hemminger wrote: > When davem merges the feature into net-next, dsa will merge this into > iproute2-next. > We hold off merging into iproute2 because often the kernel review feedback > causes > API changes. Got it, Thanks. Regards Hangbin

Re: [PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-17 Thread Hangbin Liu
"use whatever default value", the same behavior with ttl == 0. > > Reported-by: Jianlin Shi <ji...@redhat.com> > Suggested-by: Jiri Benc <jb...@redhat.com> > Signed-off-by: Hangbin Liu <liuhang...@gmail.com>

[PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-17 Thread Hangbin Liu
Jianlin Shi <ji...@redhat.com> Suggested-by: Jiri Benc <jb...@redhat.com> Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- include/uapi/linux/if_link.h | 1 + ip/iplink_vxlan.c| 8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/inclu

Re: [PATCHv2 net-next] vxlan: add ttl inherit support

2018-04-17 Thread Hangbin Liu
On Tue, Apr 17, 2018 at 03:16:27PM -0400, David Miller wrote: > From: Hangbin Liu <liuhang...@gmail.com> > Date: Tue, 17 Apr 2018 20:52:54 +0800 > > > Like tos inherit, ttl inherit should also means inherit the inner protocol's > > ttl values, which actually n

[PATCHv2 net-next] vxlan: add ttl inherit support

2018-04-17 Thread Hangbin Liu
be a behavior change, and breaking real use cases. So add a different attribute IFLA_VXLAN_TTL_INHERIT when "ttl inherit" is specified. --- v2: As suggested by Stefano, clean up function ip_tunnel_get_ttl(). Suggested-by: Jiri Benc <jb...@redhat.com> Signed-off-by: Hangbin Liu <

[PATCH net-next] vxlan: add ttl inherit support

2018-04-17 Thread Hangbin Liu
be a behavior change, and breaking real use cases. So add a different attribute IFLA_VXLAN_TTL_INHERIT when "ttl inherit" is specified with ip cmd. Reported-by: Jianlin Shi <ji...@redhat.com> Suggested-by: Jiri Benc <jb...@redhat.com> Signed-off-by: Hangbin Liu <l

Re: [PATCH net-next] vxlan: add ttl inherit support

2018-04-04 Thread Hangbin Liu
On Wed, Apr 04, 2018 at 12:03:39PM -0400, David Miller wrote: > The net-next tree is closed, please resubmit this when the net-next tree opens > back up. Sorry, I didn't pay much attention on the net-next open/close cycle before. After re-read netdev-FAQ.txt. Now I understand the steps and I need

[PATCH net-next] vxlan: add ttl inherit support

2018-04-04 Thread Hangbin Liu
be a behavior change, and breaking real use cases. So add a different attribute IFLA_VXLAN_TTL_INHERIT when "ttl inherit" is specified with ip cmd. Reported-by: Jianlin Shi <ji...@redhat.com> Suggested-by: Jiri Benc <jb...@redhat.com> Signed-off-by: Hangbin Liu <l

[PATCH net] vlan: also check phy_driver ts_info for vlan's real device

2018-03-29 Thread Hangbin Liu
Just like function ethtool_get_ts_info(), we should also consider the phy_driver ts_info call back. For example, driver dp83640. Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.") Acked-by: Richard Cochran <richardcoch...@gmail.com> Signed-off-by: Hang

[PATCHv2 net] l2tp: fix missing print session offset info

2017-12-21 Thread Hangbin Liu
Fixes: 309795f4bec ("l2tp: Add netlink control API for L2TP") Reported-by: Jianlin Shi <ji...@redhat.com> Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- net/l2tp/l2tp_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/l2tp/l2tp_netlink.c b/net/l2t

Re: [PATCH net] l2tp: fix missing print session offset info

2017-12-21 Thread Hangbin Liu
On Thu, Dec 21, 2017 at 03:08:36PM -0500, David Miller wrote: > From: Hangbin Liu <liuhang...@gmail.com> > Date: Thu, 21 Dec 2017 14:45:30 +0800 > > > + (session->offset && > > +nla_put_u16(skb, L2TP_ATTR_OFFSET, session->offset) || > &

[PATCH net] l2tp: fix missing print session offset info

2017-12-20 Thread Hangbin Liu
Fixes: 309795f4bec ("l2tp: Add netlink control API for L2TP") Reported-by: Jianlin Shi <ji...@redhat.com> Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- net/l2tp/l2tp_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/l2tp/l2tp_netlink.c b/net/l2t

Re: [PATCH net] sit: update frag_off info

2017-11-30 Thread Hangbin Liu
On Thu, Nov 30, 2017 at 03:08:51PM +0100, Nicolas Dichtel wrote: > Le 30/11/2017 à 03:41, Hangbin Liu a écrit : > > After parsing the sit netlink change info, we forget to update frag_off in > > ipip6_tunnel_update(). Fix it by assigning frag_off with new value. > > > >

[PATCH net] sit: update frag_off info

2017-11-29 Thread Hangbin Liu
After parsing the sit netlink change info, we forget to update frag_off in ipip6_tunnel_update(). Fix it by assigning frag_off with new value. Fixes: f37234160233 ("sit: add support of link creation via rtnl") Reported-by: Jianlin Shi <ji...@redhat.com> Signed-off-by: Hang

Re: [PATCH net] geneve: only configure or fill UDP_ZERO_CSUM6_RX/TX info when CONFIG_IPV6

2017-11-23 Thread Hangbin Liu
On Thu, Nov 23, 2017 at 01:35:26PM +0100, Stefano Brivio wrote: > On Thu, 23 Nov 2017 11:27:24 +0800 > Hangbin Liu <liuhang...@gmail.com> wrote: > > > Stefano pointed that configure or show UDP_ZERO_CSUM6_RX/TX info doesn't > > make sense if we haven't enabled CO

[PATCH net] geneve: only configure or fill UDP_ZERO_CSUM6_RX/TX info when CONFIG_IPV6

2017-11-22 Thread Hangbin Liu
Stefano pointed that configure or show UDP_ZERO_CSUM6_RX/TX info doesn't make sense if we haven't enabled CONFIG_IPV6. Fix it by adding if IS_ENABLED(CONFIG_IPV6) check. Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- drivers/net/geneve.c | 16 +++- 1 file chang

[PATCHv2 net] geneve: fix fill_info when link down

2017-11-14 Thread Hangbin Liu
g *_REMOTE{,6} for COLLECT_METADATA since they are mutually exclusive, and always show UDP_ZERO_CSUM6_RX info. Fixes: 11387fe4a98 ("geneve: fix fill_info when using collect_metadata") Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- drivers/net/geneve.c | 24 ++-- 1 file

Re: [PATCH net] geneve: show remote address and checksum info even after link down

2017-11-13 Thread Hangbin Liu
Hi Eric, Thanks for the comments. On Mon, Nov 13, 2017 at 03:27:25PM -0500, Eric Garver wrote: > > Fixes: 11387fe4a98 ("geneve: fix fill_info when using collect_metadata") > > Signed-off-by: Hangbin Liu <liuhang...@gmail.com> > >

[PATCH net] geneve: show remote address and checksum info even after link down

2017-11-13 Thread Hangbin Liu
or: only show the corresponding remote address and always show checksum info. Fixes: 11387fe4a98 ("geneve: fix fill_info when using collect_metadata") Signed-off-by: Hangbin Liu <liuhang...@gmail.com> --- drivers/net/geneve.c | 28 +++- 1 file changed, 1

[PATCHv2 net] bonding: discard lowest hash bit for 802.3ad layer3+4

2017-11-05 Thread Hangbin Liu
gested fix this by changing the bonding code only, which should be more reasonable, and less impact. Fix this by discarding the lowest hash bit because it contains little entropy. After the fix we can re-balance between slaves. Signed-off-by: Paolo Abeni <pab...@redhat.com> Signed-off-by: Hang

Re: [PATCH net] bonding: discard lowest hash bit for 802.3ad layer3+4

2017-11-05 Thread Hangbin Liu
On Sun, Nov 05, 2017 at 01:38:47PM -0800, Eric Dumazet wrote: > > diff --git a/drivers/net/bonding/bond_main.c > > b/drivers/net/bonding/bond_main.c > > index c99dc59..728fa08 100644 > > --- a/drivers/net/bonding/bond_main.c > > +++ b/drivers/net/bonding/bond_main.c > > @@ -3237,7 +3237,7 @@ u32

[PATCH net] bonding: discard lowest hash bit for 802.3ad layer3+4

2017-11-05 Thread Hangbin Liu
gested fix this by changing the bonding code only, which should be more reasonable, and less impact. Fix this by discarding the lowest hash bit because it contains little entropy. After the fix we can re-balance between slaves. Signed-off-by: Paolo Abeni <pab...@redhat.com> Signed-off-by: Hang

[PATCHv5 iproute2 net-next 0/2] libnetlink: malloc correct buff at run time

2017-10-25 Thread Hangbin Liu
er space in callers if only used for holding output data. * Drop initialization of answer pointer if not necessary. * Change callers to pass NULL instead of answer pointer if they don't use it afterwards. Hangbin Liu (2): lib/libnetlink: re malloc buff if size is not enough lib/libnetlink: update

[PATCHv5 iproute2 net-next 2/2] lib/libnetlink: re malloc buff if size is not enough

2017-10-25 Thread Hangbin Liu
t not hard code the buffer size and malloc the correct number when running. Introduce function rtnl_recvmsg() to always return a newly allocated buffer. The caller need to free it after using. Signed-off-by: Hangbin Liu <liuhang...@gmail.com> Signed-off-by: Phil Sutter <p...@nwl.cc> ---

[PATCHv5 iproute2 net-next 2/2] lib/libnetlink: update rtnl_talk to support malloc buff at run time

2017-10-25 Thread Hangbin Liu
rtnl_talk(, nlh, nlh, sizeof(req), I add a new variable answer to avoid overwrite data in nlh, because it may has more info after nlh. also this will avoid nlh buffer not enough issue. We need to free answer after using. Signed-off-by: Hangbin Liu <liuhang...@gmail.com> Signed-off-by: Phil Sut

  1   2   3   >