File: 554.patch

package info (click to toggle)
xdp-tools 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,360 kB
  • sloc: ansic: 24,678; sh: 2,627; makefile: 422; python: 337; lisp: 53
file content (22 lines) | stat: -rw-r--r-- 757 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Forwarded: https://github.com/xdp-project/xdp-tools/pull/554
Description: Update xdpsock.c, fix build with "-Werror=stringop-overread"
--- a/lib/util/xdpsock.c
+++ b/lib/util/xdpsock.c
@@ -1669,6 +1669,7 @@ bool xsk_probe_busy_poll(void)
 	struct xsk_ring_cons rx;
 	void *bufs;
 	int ret;
+	char ifname[IFNAMSIZ] = "lo";
 
 	bufs = mmap(NULL, NUM_FRAMES * frame_size,
 		    PROT_READ | PROT_WRITE,
@@ -1688,7 +1689,7 @@ bool xsk_probe_busy_poll(void)
 		goto out;
 	}
 
-	ret = xsk_socket__create(&xsk, "lo", 0, umem->umem, &rx, NULL, &cfg);
+	ret = xsk_socket__create(&xsk, ifname, 0, umem->umem, &rx, NULL, &cfg);
 	if (ret) {
 		pr_debug("Failed to create socket: %d\n", ret);
 		goto out;