Commit c10a4da4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add onlink flag when installing routes.

This is needed when there is no route to the gateway.
parent 9c112efc
...@@ -614,7 +614,6 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen, ...@@ -614,7 +614,6 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
int len = sizeof(buf.raw); int len = sizeof(buf.raw);
int rc, ipv4; int rc, ipv4;
if(!nl_setup) { if(!nl_setup) {
fprintf(stderr,"kernel_route: netlink not initialized.\n"); fprintf(stderr,"kernel_route: netlink not initialized.\n");
errno = EIO; errno = EIO;
...@@ -693,6 +692,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen, ...@@ -693,6 +692,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
else else
rtm->rtm_type = RTN_UNREACHABLE; rtm->rtm_type = RTN_UNREACHABLE;
rtm->rtm_protocol = RTPROT_BABEL; rtm->rtm_protocol = RTPROT_BABEL;
rtm->rtm_flags |= RTNH_F_ONLINK;
rta = RTM_RTA(rtm); rta = RTM_RTA(rtm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment