Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-26 Thread Sabrina Dubroca
2019-02-26, 11:48:54 +0800, Hangbin Liu wrote: > Hi David, > On Mon, Feb 25, 2019 at 07:23:33PM -0700, David Ahern wrote: > > On 2/25/19 7:17 PM, Hangbin Liu wrote: > > > I also thought about this issue. Currently we didn't check the ipproto in > > > both > > > IPv4 and IPv6. You can set icmp in i

Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-25 Thread Hangbin Liu
Hi David, On Mon, Feb 25, 2019 at 07:23:33PM -0700, David Ahern wrote: > On 2/25/19 7:17 PM, Hangbin Liu wrote: > > I also thought about this issue. Currently we didn't check the ipproto in > > both > > IPv4 and IPv6. You can set icmp in ip6 rules or icmpv6 in ipv4 rules. > > This looks don't make

Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-25 Thread David Ahern
On 2/25/19 7:17 PM, Hangbin Liu wrote: > I also thought about this issue. Currently we didn't check the ipproto in both > IPv4 and IPv6. You can set icmp in ip6 rules or icmpv6 in ipv4 rules. > This looks don't make any serious problem. It's just a user mis-configuration, > the kernel check the pro

Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-25 Thread Hangbin Liu
On Mon, Feb 25, 2019 at 11:46:51AM -0700, David Ahern wrote: > On 2/25/19 4:14 AM, Sabrina Dubroca wrote: > > 2019-02-25, 15:47:00 +0800, Hangbin Liu wrote: > >> @@ -14,6 +15,7 @@ int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 > >> *ip_proto, > >>case IPPROTO_TCP: > >>case IPPROTO

Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-25 Thread David Ahern
On 2/25/19 4:14 AM, Sabrina Dubroca wrote: > 2019-02-25, 15:47:00 +0800, Hangbin Liu wrote: >> @@ -14,6 +15,7 @@ int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 >> *ip_proto, >> case IPPROTO_TCP: >> case IPPROTO_UDP: >> case IPPROTO_ICMP: >> +case IPPROTO_ICMPV6: > > Is

Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-25 Thread Sabrina Dubroca
2019-02-25, 15:47:00 +0800, Hangbin Liu wrote: > @@ -14,6 +15,7 @@ int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 > *ip_proto, > case IPPROTO_TCP: > case IPPROTO_UDP: > case IPPROTO_ICMP: > + case IPPROTO_ICMPV6: Is IPPROTO_ICMPV6 supposed to be valid in the IPv4 co

[PATCH net] ipv4: Add ICMPv6 support when parse route ipproto

2019-02-24 Thread Hangbin Liu
For ip rules, we need to use 'ipproto ipv6-icmp' to match ICMPv6 headers. But for ip -6 route, currently we only support tcp, udp and icmp. Add ICMPv6 support so we can match ipv6-icmp rules for route lookup. Reported-by: Jianlin Shi Fixes: eacb9384a3fe ("ipv6: support sport, dport and ip_proto