the code already has a path to the tan/tap device
Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
fd_path = globbuf.gl_pathv;
while (*fd_path) {
- const char *dev_net_tun = "/dev/net/tun";
- const size_t linkbuf_len = strlen(dev_net_tun) + 2;
+ const size_t linkbuf_len = strlen(TUNDEV) + 2;
char linkbuf[linkbuf_len], *fdinfo;
int pid, fd;
FILE *f;
goto next;
}
linkbuf[err] = '\0';
- if (strcmp(dev_net_tun, linkbuf))
+ if (strcmp(TUNDEV, linkbuf))
goto next;
if (asprintf(&fdinfo, "/proc/%d/fdinfo/%d", pid, fd) < 0)