aboutgitcodebugslistschat
path: root/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'udp.c')
-rw-r--r--udp.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/udp.c b/udp.c
index 2f79297..3b8a70a 100644
--- a/udp.c
+++ b/udp.c
@@ -616,9 +616,9 @@ static void udp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
if (ref.r.p.udp.udp.splice == UDP_TO_NS ||
ref.r.p.udp.udp.splice == UDP_TO_INIT) {
for (i = 0; i < n; i++) {
- struct msghdr *mh = &udp_splice_mmh_send[i].msg_hdr;
+ struct msghdr *mh_s = &udp_splice_mmh_send[i].msg_hdr;
- mh->msg_iov->iov_len = udp_splice_mmh_recv[i].msg_len;
+ mh_s->msg_iov->iov_len = udp_splice_mmh_recv[i].msg_len;
}
sendmmsg(s, udp_splice_mmh_send, n, MSG_NOSIGNAL);
@@ -626,9 +626,9 @@ static void udp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
}
for (i = 0; i < n; i++) {
- struct msghdr *mh = &udp_splice_mmh_sendto[i].msg_hdr;
+ struct msghdr *mh_s = &udp_splice_mmh_sendto[i].msg_hdr;
- mh->msg_iov->iov_len = udp_splice_mmh_recv[i].msg_len;
+ mh_s->msg_iov->iov_len = udp_splice_mmh_recv[i].msg_len;
}
if (v6) {
@@ -710,8 +710,6 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
else
b->ip6h.saddr = c->addr6_ll;
- b->ip6h.saddr = c->gw6;
-
udp_tap_map[V6][src].ts_local = now->tv_sec;
if (IN6_IS_ADDR_LOOPBACK(&b->s_in6.sin6_addr))
@@ -1000,11 +998,11 @@ int udp_tap_handler(struct ctx *c, int af, void *addr,
}
for (i = 0; i < count; i++) {
- struct udphdr *uh;
+ struct udphdr *uh_send;
- uh = (struct udphdr *)(msg[i].pkt_buf_offset + pkt_buf);
- m[i].iov_base = (char *)(uh + 1);
- m[i].iov_len = msg[i].l4_len - sizeof(*uh);
+ uh_send = (struct udphdr *)(msg[i].pkt_buf_offset + pkt_buf);
+ m[i].iov_base = (char *)(uh_send + 1);
+ m[i].iov_len = msg[i].l4_len - sizeof(*uh_send);
mm[i].msg_hdr.msg_name = sa;
mm[i].msg_hdr.msg_namelen = sl;