Skip to content

Commit

Permalink
Merge pull request #94 from bluca/tunnel
Browse files Browse the repository at this point in the history
No router advertisements on tunnel interfaces
  • Loading branch information
robbat2 committed Jun 19, 2018
2 parents c41be28 + 86a0b80 commit 849f69c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions device-common.c
Expand Up @@ -45,11 +45,15 @@ int check_device(int sock, struct Interface *iface)
dlog(LOG_ERR, 4, "%s is running", iface->props.name);
}

if (!iface->UnicastOnly && !(ifr.ifr_flags & IFF_MULTICAST)) {
flog(LOG_INFO, "%s does not support multicast, forcing UnicastOnly", iface->props.name);
if (!iface->UnicastOnly &&
!(ifr.ifr_flags & (IFF_MULTICAST | IFF_POINTOPOINT))) {
flog(LOG_INFO,
"%s does not support multicast or point-to-point, forcing UnicastOnly",
iface->props.name);
iface->UnicastOnly = 1;
} else {
dlog(LOG_ERR, 4, "%s supports multicast", iface->props.name);
dlog(LOG_ERR, 4, "%s supports multicast or is point-to-point",
iface->props.name);
}

return 0;
Expand Down

0 comments on commit 849f69c

Please sign in to comment.