Message ID | 20210119175427.2050737-4-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls | expand |
On 1/19/21 6:54 PM, Laurent Vivier wrote: > From: Shu-Chun Weng <scw@google.com> > > IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. > > Signed-off-by: Shu-Chun Weng <scw@google.com> > Reviewed-by: Laurent Vivier <laurent@vivier.eu> > Message-Id: <20201218193213.3566856-4-scw@google.com> > Signed-off-by: Laurent Vivier <laurent@vivier.eu> > --- > linux-user/syscall.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 969db2008104..70c61d15ebf8 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -51,6 +51,7 @@ > #include <sys/sysinfo.h> > #include <sys/signalfd.h> > //#include <sys/user.h> > +#include <netinet/in.h> > #include <netinet/ip.h> > #include <netinet/tcp.h> > #include <netinet/udp.h> > @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, > case IPV6_RECVDSTOPTS: > case IPV6_2292DSTOPTS: > case IPV6_TCLASS: > + case IPV6_ADDR_PREFERENCES: > #ifdef IPV6_RECVPATHMTU > case IPV6_RECVPATHMTU: > #endif > @@ -2926,6 +2928,7 @@ get_timeout: > case IPV6_RECVDSTOPTS: > case IPV6_2292DSTOPTS: > case IPV6_TCLASS: > + case IPV6_ADDR_PREFERENCES: > #ifdef IPV6_RECVPATHMTU > case IPV6_RECVPATHMTU: > #endif > Building on Centos7: ../linux-user/syscall.c: In function 'do_setsockopt': ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' undeclared (first use in this function) case IPV6_ADDR_PREFERENCES: ^ ../linux-user/syscall.c:2276:14: note: each undeclared identifier is reported only once for each function it appears in ../linux-user/syscall.c: In function 'do_getsockopt': ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' undeclared (first use in this function) case IPV6_ADDR_PREFERENCES: ^
Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit : > On 1/19/21 6:54 PM, Laurent Vivier wrote: >> From: Shu-Chun Weng <scw@google.com> >> >> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. >> >> Signed-off-by: Shu-Chun Weng <scw@google.com> >> Reviewed-by: Laurent Vivier <laurent@vivier.eu> >> Message-Id: <20201218193213.3566856-4-scw@google.com> >> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >> --- >> linux-user/syscall.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >> index 969db2008104..70c61d15ebf8 100644 >> --- a/linux-user/syscall.c >> +++ b/linux-user/syscall.c >> @@ -51,6 +51,7 @@ >> #include <sys/sysinfo.h> >> #include <sys/signalfd.h> >> //#include <sys/user.h> >> +#include <netinet/in.h> >> #include <netinet/ip.h> >> #include <netinet/tcp.h> >> #include <netinet/udp.h> >> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, >> case IPV6_RECVDSTOPTS: >> case IPV6_2292DSTOPTS: >> case IPV6_TCLASS: >> + case IPV6_ADDR_PREFERENCES: >> #ifdef IPV6_RECVPATHMTU >> case IPV6_RECVPATHMTU: >> #endif >> @@ -2926,6 +2928,7 @@ get_timeout: >> case IPV6_RECVDSTOPTS: >> case IPV6_2292DSTOPTS: >> case IPV6_TCLASS: >> + case IPV6_ADDR_PREFERENCES: >> #ifdef IPV6_RECVPATHMTU >> case IPV6_RECVPATHMTU: >> #endif >> > > Building on Centos7: > > ../linux-user/syscall.c: In function 'do_setsockopt': > ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' > undeclared (first use in this function) > case IPV6_ADDR_PREFERENCES: > ^ > ../linux-user/syscall.c:2276:14: note: each undeclared identifier is > reported only once for each function it appears in > ../linux-user/syscall.c: In function 'do_getsockopt': > ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' > undeclared (first use in this function) > case IPV6_ADDR_PREFERENCES: > ^ > Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h 7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014). Could try adding the include? Thanks, Laurent
On 1/20/21 5:00 PM, Laurent Vivier wrote: > Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit : >> On 1/19/21 6:54 PM, Laurent Vivier wrote: >>> From: Shu-Chun Weng <scw@google.com> >>> >>> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. >>> >>> Signed-off-by: Shu-Chun Weng <scw@google.com> >>> Reviewed-by: Laurent Vivier <laurent@vivier.eu> >>> Message-Id: <20201218193213.3566856-4-scw@google.com> >>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>> --- >>> linux-user/syscall.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>> index 969db2008104..70c61d15ebf8 100644 >>> --- a/linux-user/syscall.c >>> +++ b/linux-user/syscall.c >>> @@ -51,6 +51,7 @@ >>> #include <sys/sysinfo.h> >>> #include <sys/signalfd.h> >>> //#include <sys/user.h> >>> +#include <netinet/in.h> >>> #include <netinet/ip.h> >>> #include <netinet/tcp.h> >>> #include <netinet/udp.h> >>> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, >>> case IPV6_RECVDSTOPTS: >>> case IPV6_2292DSTOPTS: >>> case IPV6_TCLASS: >>> + case IPV6_ADDR_PREFERENCES: >>> #ifdef IPV6_RECVPATHMTU >>> case IPV6_RECVPATHMTU: >>> #endif >>> @@ -2926,6 +2928,7 @@ get_timeout: >>> case IPV6_RECVDSTOPTS: >>> case IPV6_2292DSTOPTS: >>> case IPV6_TCLASS: >>> + case IPV6_ADDR_PREFERENCES: >>> #ifdef IPV6_RECVPATHMTU >>> case IPV6_RECVPATHMTU: >>> #endif >>> >> >> Building on Centos7: >> >> ../linux-user/syscall.c: In function 'do_setsockopt': >> ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' >> undeclared (first use in this function) >> case IPV6_ADDR_PREFERENCES: >> ^ >> ../linux-user/syscall.c:2276:14: note: each undeclared identifier is >> reported only once for each function it appears in >> ../linux-user/syscall.c: In function 'do_getsockopt': >> ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' >> undeclared (first use in this function) >> case IPV6_ADDR_PREFERENCES: >> ^ >> > > Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h > > 7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014). > > Could try adding the include? Yes, this fixed it, thanks: -- >8 -- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1f91aa0ed5e..34760779c8e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -59,6 +59,7 @@ #include <linux/icmp.h> #include <linux/icmpv6.h> #include <linux/if_tun.h> +#include <linux/in6.h> #include <linux/errqueue.h> #include <linux/random.h> #ifdef CONFIG_TIMERFD ---
Le 20/01/2021 à 17:12, Philippe Mathieu-Daudé a écrit : > On 1/20/21 5:00 PM, Laurent Vivier wrote: >> Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit : >>> On 1/19/21 6:54 PM, Laurent Vivier wrote: >>>> From: Shu-Chun Weng <scw@google.com> >>>> >>>> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. >>>> >>>> Signed-off-by: Shu-Chun Weng <scw@google.com> >>>> Reviewed-by: Laurent Vivier <laurent@vivier.eu> >>>> Message-Id: <20201218193213.3566856-4-scw@google.com> >>>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>>> --- >>>> linux-user/syscall.c | 3 +++ >>>> 1 file changed, 3 insertions(+) >>>> >>>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>>> index 969db2008104..70c61d15ebf8 100644 >>>> --- a/linux-user/syscall.c >>>> +++ b/linux-user/syscall.c >>>> @@ -51,6 +51,7 @@ >>>> #include <sys/sysinfo.h> >>>> #include <sys/signalfd.h> >>>> //#include <sys/user.h> >>>> +#include <netinet/in.h> >>>> #include <netinet/ip.h> >>>> #include <netinet/tcp.h> >>>> #include <netinet/udp.h> >>>> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, >>>> case IPV6_RECVDSTOPTS: >>>> case IPV6_2292DSTOPTS: >>>> case IPV6_TCLASS: >>>> + case IPV6_ADDR_PREFERENCES: >>>> #ifdef IPV6_RECVPATHMTU >>>> case IPV6_RECVPATHMTU: >>>> #endif >>>> @@ -2926,6 +2928,7 @@ get_timeout: >>>> case IPV6_RECVDSTOPTS: >>>> case IPV6_2292DSTOPTS: >>>> case IPV6_TCLASS: >>>> + case IPV6_ADDR_PREFERENCES: >>>> #ifdef IPV6_RECVPATHMTU >>>> case IPV6_RECVPATHMTU: >>>> #endif >>>> >>> >>> Building on Centos7: >>> >>> ../linux-user/syscall.c: In function 'do_setsockopt': >>> ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' >>> undeclared (first use in this function) >>> case IPV6_ADDR_PREFERENCES: >>> ^ >>> ../linux-user/syscall.c:2276:14: note: each undeclared identifier is >>> reported only once for each function it appears in >>> ../linux-user/syscall.c: In function 'do_getsockopt': >>> ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' >>> undeclared (first use in this function) >>> case IPV6_ADDR_PREFERENCES: >>> ^ >>> >> >> Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h >> >> 7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014). >> >> Could try adding the include? > > Yes, this fixed it, thanks: > > -- >8 -- > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 1f91aa0ed5e..34760779c8e 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -59,6 +59,7 @@ > #include <linux/icmp.h> > #include <linux/icmpv6.h> > #include <linux/if_tun.h> > +#include <linux/in6.h> > #include <linux/errqueue.h> > #include <linux/random.h> > #ifdef CONFIG_TIMERFD > --- > Could you send a patch to the ML? Thanks, Laurent
On 1/20/21 5:22 PM, Laurent Vivier wrote: > Le 20/01/2021 à 17:12, Philippe Mathieu-Daudé a écrit : >> On 1/20/21 5:00 PM, Laurent Vivier wrote: >>> Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit : >>>> On 1/19/21 6:54 PM, Laurent Vivier wrote: >>>>> From: Shu-Chun Weng <scw@google.com> >>>>> >>>>> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. >>>>> >>>>> Signed-off-by: Shu-Chun Weng <scw@google.com> >>>>> Reviewed-by: Laurent Vivier <laurent@vivier.eu> >>>>> Message-Id: <20201218193213.3566856-4-scw@google.com> >>>>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>>>> --- >>>>> linux-user/syscall.c | 3 +++ >>>>> 1 file changed, 3 insertions(+) >>>>> >>>>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>>>> index 969db2008104..70c61d15ebf8 100644 >>>>> --- a/linux-user/syscall.c >>>>> +++ b/linux-user/syscall.c >>>>> @@ -51,6 +51,7 @@ >>>>> #include <sys/sysinfo.h> >>>>> #include <sys/signalfd.h> >>>>> //#include <sys/user.h> >>>>> +#include <netinet/in.h> >>>>> #include <netinet/ip.h> >>>>> #include <netinet/tcp.h> >>>>> #include <netinet/udp.h> >>>>> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, >>>>> case IPV6_RECVDSTOPTS: >>>>> case IPV6_2292DSTOPTS: >>>>> case IPV6_TCLASS: >>>>> + case IPV6_ADDR_PREFERENCES: >>>>> #ifdef IPV6_RECVPATHMTU >>>>> case IPV6_RECVPATHMTU: >>>>> #endif >>>>> @@ -2926,6 +2928,7 @@ get_timeout: >>>>> case IPV6_RECVDSTOPTS: >>>>> case IPV6_2292DSTOPTS: >>>>> case IPV6_TCLASS: >>>>> + case IPV6_ADDR_PREFERENCES: >>>>> #ifdef IPV6_RECVPATHMTU >>>>> case IPV6_RECVPATHMTU: >>>>> #endif >>>>> >>>> >>>> Building on Centos7: >>>> >>>> ../linux-user/syscall.c: In function 'do_setsockopt': >>>> ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' >>>> undeclared (first use in this function) >>>> case IPV6_ADDR_PREFERENCES: >>>> ^ >>>> ../linux-user/syscall.c:2276:14: note: each undeclared identifier is >>>> reported only once for each function it appears in >>>> ../linux-user/syscall.c: In function 'do_getsockopt': >>>> ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' >>>> undeclared (first use in this function) >>>> case IPV6_ADDR_PREFERENCES: >>>> ^ >>>> >>> >>> Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h >>> >>> 7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014). >>> >>> Could try adding the include? >> >> Yes, this fixed it, thanks: >> >> -- >8 -- >> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >> index 1f91aa0ed5e..34760779c8e 100644 >> --- a/linux-user/syscall.c >> +++ b/linux-user/syscall.c >> @@ -59,6 +59,7 @@ >> #include <linux/icmp.h> >> #include <linux/icmpv6.h> >> #include <linux/if_tun.h> >> +#include <linux/in6.h> >> #include <linux/errqueue.h> >> #include <linux/random.h> >> #ifdef CONFIG_TIMERFD >> --- >> > > Could you send a patch to the ML? Me? OK... > > Thanks, > Laurent >
Le 20/01/2021 à 17:56, Philippe Mathieu-Daudé a écrit : > On 1/20/21 5:22 PM, Laurent Vivier wrote: >> Le 20/01/2021 à 17:12, Philippe Mathieu-Daudé a écrit : >>> On 1/20/21 5:00 PM, Laurent Vivier wrote: >>>> Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit : >>>>> On 1/19/21 6:54 PM, Laurent Vivier wrote: >>>>>> From: Shu-Chun Weng <scw@google.com> >>>>>> >>>>>> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. >>>>>> >>>>>> Signed-off-by: Shu-Chun Weng <scw@google.com> >>>>>> Reviewed-by: Laurent Vivier <laurent@vivier.eu> >>>>>> Message-Id: <20201218193213.3566856-4-scw@google.com> >>>>>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>>>>> --- >>>>>> linux-user/syscall.c | 3 +++ >>>>>> 1 file changed, 3 insertions(+) >>>>>> >>>>>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>>>>> index 969db2008104..70c61d15ebf8 100644 >>>>>> --- a/linux-user/syscall.c >>>>>> +++ b/linux-user/syscall.c >>>>>> @@ -51,6 +51,7 @@ >>>>>> #include <sys/sysinfo.h> >>>>>> #include <sys/signalfd.h> >>>>>> //#include <sys/user.h> >>>>>> +#include <netinet/in.h> >>>>>> #include <netinet/ip.h> >>>>>> #include <netinet/tcp.h> >>>>>> #include <netinet/udp.h> >>>>>> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, >>>>>> case IPV6_RECVDSTOPTS: >>>>>> case IPV6_2292DSTOPTS: >>>>>> case IPV6_TCLASS: >>>>>> + case IPV6_ADDR_PREFERENCES: >>>>>> #ifdef IPV6_RECVPATHMTU >>>>>> case IPV6_RECVPATHMTU: >>>>>> #endif >>>>>> @@ -2926,6 +2928,7 @@ get_timeout: >>>>>> case IPV6_RECVDSTOPTS: >>>>>> case IPV6_2292DSTOPTS: >>>>>> case IPV6_TCLASS: >>>>>> + case IPV6_ADDR_PREFERENCES: >>>>>> #ifdef IPV6_RECVPATHMTU >>>>>> case IPV6_RECVPATHMTU: >>>>>> #endif >>>>>> >>>>> >>>>> Building on Centos7: >>>>> >>>>> ../linux-user/syscall.c: In function 'do_setsockopt': >>>>> ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES' >>>>> undeclared (first use in this function) >>>>> case IPV6_ADDR_PREFERENCES: >>>>> ^ >>>>> ../linux-user/syscall.c:2276:14: note: each undeclared identifier is >>>>> reported only once for each function it appears in >>>>> ../linux-user/syscall.c: In function 'do_getsockopt': >>>>> ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES' >>>>> undeclared (first use in this function) >>>>> case IPV6_ADDR_PREFERENCES: >>>>> ^ >>>>> >>>> >>>> Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h >>>> >>>> 7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014). >>>> >>>> Could try adding the include? >>> >>> Yes, this fixed it, thanks: >>> >>> -- >8 -- >>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>> index 1f91aa0ed5e..34760779c8e 100644 >>> --- a/linux-user/syscall.c >>> +++ b/linux-user/syscall.c >>> @@ -59,6 +59,7 @@ >>> #include <linux/icmp.h> >>> #include <linux/icmpv6.h> >>> #include <linux/if_tun.h> >>> +#include <linux/in6.h> >>> #include <linux/errqueue.h> >>> #include <linux/random.h> >>> #ifdef CONFIG_TIMERFD >>> --- >>> >> >> Could you send a patch to the ML? > > Me? OK... > Oh, I didn't see the message from Peter and I though it was already merged, so I was speaking about a patch to fix the build... Anyway, you did it, so I will update the the PR with your update. Thank you Philippe :) Laurent
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 969db2008104..70c61d15ebf8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -51,6 +51,7 @@ #include <sys/sysinfo.h> #include <sys/signalfd.h> //#include <sys/user.h> +#include <netinet/in.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, case IPV6_RECVDSTOPTS: case IPV6_2292DSTOPTS: case IPV6_TCLASS: + case IPV6_ADDR_PREFERENCES: #ifdef IPV6_RECVPATHMTU case IPV6_RECVPATHMTU: #endif @@ -2926,6 +2928,7 @@ get_timeout: case IPV6_RECVDSTOPTS: case IPV6_2292DSTOPTS: case IPV6_TCLASS: + case IPV6_ADDR_PREFERENCES: #ifdef IPV6_RECVPATHMTU case IPV6_RECVPATHMTU: #endif