Already committed as of 7 minutes ago, heh!

Am Thu, Feb 11, 2021 at 10:48:16AM +0000 schrieb Ricardo Mestre:
> Hi,
> 
> It seems this got the args swapped as described in CID 1501717.
> 
> stoeplitz_ip6port being a macro for stoeplitz_hash_ip6port and the arguments
> placed as shown below. Similarly stoeplitz_ip4port also has the same problem
> most likely due to copypasto.
> 
> Comments? OK?
> 
> 173 uint16_t
> 174 stoeplitz_hash_ip6port(const struct stoeplitz_cache *scache,
> 175     const struct in6_addr *faddr6, const struct in6_addr *laddr6,
> 176     in_port_t fport, in_port_t lport)
> 
> Index: netinet/in_pcb.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/in_pcb.c,v
> retrieving revision 1.253
> diff -u -p -u -r1.253 in_pcb.c
> --- netinet/in_pcb.c  25 Jan 2021 03:40:46 -0000      1.253
> +++ netinet/in_pcb.c  11 Feb 2021 10:34:50 -0000
> @@ -522,8 +522,8 @@ in_pcbconnect(struct inpcb *inp, struct 
>       inp->inp_fport = sin->sin_port;
>       in_pcbrehash(inp);
>  #if NSTOEPLITZ > 0
> -     inp->inp_flowid = stoeplitz_ip4port(inp->inp_laddr.s_addr,
> -         inp->inp_faddr.s_addr, inp->inp_lport, inp->inp_fport);
> +     inp->inp_flowid = stoeplitz_ip4port(inp->inp_faddr.s_addr,
> +         inp->inp_laddr.s_addr, inp->inp_fport, inp->inp_lport);
>  #endif
>  #ifdef IPSEC
>       {
> Index: netinet6/in6_pcb.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet6/in6_pcb.c,v
> retrieving revision 1.111
> diff -u -p -u -r1.111 in6_pcb.c
> --- netinet6/in6_pcb.c        25 Jan 2021 03:40:47 -0000      1.111
> +++ netinet6/in6_pcb.c        11 Feb 2021 10:34:50 -0000
> @@ -303,8 +303,8 @@ in6_pcbconnect(struct inpcb *inp, struct
>               inp->inp_flowinfo |=
>                   (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
>  #if NSTOEPLITZ > 0
> -     inp->inp_flowid = stoeplitz_ip6port(&inp->inp_laddr6,
> -         &inp->inp_faddr6, inp->inp_lport, inp->inp_fport);
> +     inp->inp_flowid = stoeplitz_ip6port(&inp->inp_faddr6,
> +         &inp->inp_laddr6, inp->inp_fport, inp->inp_lport);
>  #endif
>       in_pcbrehash(inp);
>       return (0);
> 

Reply via email to