Re: [RFC PATCH bpf-next 11/14] bpf: Introduce BPF_SOCK_OPS_UDP_CONNECTED_CB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >         res = __ip4_datagram_connect(sk, uaddr, addr_len);
> >         if (!res)
> >                 udp4_hash4(sk);
> > +       udp_call_bpf(sk, BPF_SOCK_OPS_UDP_CONNECTED_CB);
> 
> Why is this called on failure ?
> 
> Same for IPv6.

My mistake, it should only be called on success.

	if (!res) {
		udp4_hash4(sk);
		udp_call_bpf(sk, BPF_SOCK_OPS_UDP_CONNECTED_CB);
	}

I'll fix this in a later revision.

Jordan





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux