Skip to content

Commit

Permalink
phantap-learn: do not use proto for ip neigh
Browse files Browse the repository at this point in the history
This was only introduced in Linux 5.0
torvalds/linux@df9b0e3

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
  • Loading branch information
champtar committed Aug 5, 2019
1 parent 9849b0f commit f104742
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/phantap-learn.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ static void usage(void)
fprintf(stderr, " -i <listen-interface>\tthe interface to listen on\n");
fprintf(stderr, " -v <debug-level>\tprint some debug info (level > 0)\n");
fprintf(stderr, "\nTo show/flush neigh/route\n"
"ip neigh show proto " PHANTAP_RTPROTO "\n"
"ip neigh flush nud permanent proto " PHANTAP_RTPROTO "\n"
"ip neigh show nud permanent\n"
"ip neigh flush nud permanent\n"
"ip route show proto " PHANTAP_RTPROTO "\n"
"ip route flush proto " PHANTAP_RTPROTO "\n");
}
Expand All @@ -57,8 +57,7 @@ static void add_neighboor(const struct ether_addr *mac, const struct in_addr *ip
{
DEBUG(1, "MAC: %s / IP: %s\n", ether_ntoa(mac), inet_ntoa(*ip));
snprintf(sbuf, ARRAY_SIZE(sbuf),
"ip neigh replace %s dev %s lladdr %s proto " PHANTAP_RTPROTO,
inet_ntoa(*ip), interface, ether_ntoa(mac));
"ip neigh replace %s dev %s lladdr %s", inet_ntoa(*ip), interface, ether_ntoa(mac));
DEBUG(2, "Executing '%s' ...\n", sbuf);
if (system(sbuf))
printf("Executing '%s' failed!!\n", sbuf);
Expand Down

0 comments on commit f104742

Please sign in to comment.