udp: Remove the @bound field from union udp_epoll_ref
We set this field, but nothing ever checked it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
1cd684b09b
commit
8517239243
2 changed files with 4 additions and 7 deletions
8
udp.c
8
udp.c
|
@ -951,8 +951,7 @@ int udp_tap_handler(struct ctx *c, int af, const void *addr,
|
|||
sl = sizeof(s_in);
|
||||
|
||||
if (!(s = udp_tap_map[V4][src].sock)) {
|
||||
union udp_epoll_ref uref = { .udp.bound = 1,
|
||||
.udp.port = src };
|
||||
union udp_epoll_ref uref = { .udp.port = src };
|
||||
|
||||
s = sock_l4(c, AF_INET, IPPROTO_UDP, NULL, NULL, src,
|
||||
uref.u32);
|
||||
|
@ -1004,8 +1003,7 @@ int udp_tap_handler(struct ctx *c, int af, const void *addr,
|
|||
}
|
||||
|
||||
if (!(s = udp_tap_map[V6][src].sock)) {
|
||||
union udp_epoll_ref uref = { .udp.bound = 1,
|
||||
.udp.v6 = 1,
|
||||
union udp_epoll_ref uref = { .udp.v6 = 1,
|
||||
.udp.port = src };
|
||||
|
||||
s = sock_l4(c, AF_INET6, IPPROTO_UDP, bind_addr, NULL,
|
||||
|
@ -1068,7 +1066,7 @@ int udp_tap_handler(struct ctx *c, int af, const void *addr,
|
|||
void udp_sock_init(const struct ctx *c, int ns, sa_family_t af,
|
||||
const void *addr, const char *ifname, in_port_t port)
|
||||
{
|
||||
union udp_epoll_ref uref = { .udp.bound = 1 };
|
||||
union udp_epoll_ref uref = { .u32 = 0 };
|
||||
const void *bind_addr;
|
||||
int s;
|
||||
|
||||
|
|
3
udp.h
3
udp.h
|
@ -29,8 +29,7 @@ void udp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s,
|
|||
*/
|
||||
union udp_epoll_ref {
|
||||
struct {
|
||||
uint32_t bound:1,
|
||||
splice:3,
|
||||
uint32_t splice:3,
|
||||
#define UDP_TO_NS 1
|
||||
#define UDP_TO_INIT 2
|
||||
#define UDP_BACK_TO_NS 3
|
||||
|
|
Loading…
Reference in a new issue