diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | isolation.c | 1 | ||||
| -rw-r--r-- | netlink.c | 5 | ||||
| -rw-r--r-- | util.c | 1 |
4 files changed, 7 insertions, 4 deletions
@@ -48,8 +48,8 @@ MANPAGES = passt.1 pasta.1 pesto.1 passt-repair.1 PASST_HEADERS = arch.h arp.h bitmap.h checksum.h conf.h dhcp.h dhcpv6.h \ epoll_ctl.h flow.h fwd.h fwd_rule.h flow_table.h icmp.h icmp_flow.h \ - inany.h iov.h ip.h isolation.h lineread.h log.h migrate.h ndp.h \ - netlink.h packet.h parse.h passt.h pasta.h pcap.h pif.h repair.h \ + inany.h iov.h ip.h isolation.h lineread.h linux_dep.h log.h migrate.h \ + ndp.h netlink.h packet.h parse.h passt.h pasta.h pcap.h pif.h repair.h \ serialise.h siphash.h tap.h tcp.h tcp_buf.h tcp_conn.h tcp_internal.h \ tcp_splice.h tcp_vu.h udp.h udp_flow.h udp_internal.h udp_vu.h util.h \ vhost_user.h virtio.h vu_common.h diff --git a/isolation.c b/isolation.c index 94cbe7f..a30b329 100644 --- a/isolation.c +++ b/isolation.c @@ -89,6 +89,7 @@ #include <linux/seccomp.h> #include "util.h" +#include "linux_dep.h" #include "seccomp.h" #include "passt.h" #include "log.h" @@ -271,6 +271,7 @@ unsigned int nl_get_ext_if(int s, sa_family_t af) }; unsigned defifi = 0, anyifi = 0; unsigned ndef = 0, nany = 0; + bool multi_anyif = false; struct nlmsghdr *nh; struct rtattr *rta; char buf[NLBUFSIZ]; @@ -330,6 +331,8 @@ unsigned int nl_get_ext_if(int s, sa_family_t af) nany++; if (!anyifi) anyifi = thisifi; + else if (anyifi != thisifi) + multi_anyif = true; } } @@ -345,7 +348,7 @@ unsigned int nl_get_ext_if(int s, sa_family_t af) } if (anyifi) { - if (nany > 1) { + if (multi_anyif) { info("Multiple interfaces with %s routes, picked first", af_name(af)); } @@ -27,7 +27,6 @@ #include <linux/errqueue.h> #include <linux/in6.h> -#include "linux_dep.h" #include "util.h" #include "iov.h" #include "passt.h" |
