diff options
| author | Roy Marples <roy@marples.name> | 2020-06-16 00:48:42 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-06-16 00:48:42 +0100 |
| commit | 2b6cfac58e2dc2b7509095c0894ce892f64e8cc4 (patch) | |
| tree | 276679779fff12974e5b738bfe4a10b937a00335 | |
| parent | 774505038c1dbcdd9c8de81a4c0c81b482b566e1 (diff) | |
| download | dhcpcd-2b6cfac58e2dc2b7509095c0894ce892f64e8cc4.tar.xz | |
inet6: Report RA Proxy flag if set
| -rw-r--r-- | src/ipv6nd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c index ecec7b6c..5c4bd410 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -64,6 +64,9 @@ #ifndef ND_RA_FLAG_HOME_AGENT #define ND_RA_FLAG_HOME_AGENT 0x20 /* Home Agent flag in RA */ #endif +#ifndef ND_RA_FLAG_PROXY +#define ND_RA_FLAG_PROXY 0x04 /* Proxy */ +#endif #ifndef ND_OPT_PI_FLAG_ROUTER #define ND_OPT_PI_FLAG_ROUTER 0x20 /* Router flag in PI */ #endif @@ -1642,12 +1645,12 @@ ipv6nd_env(FILE *fp, const struct interface *ifp) if (efprintf(fp, "%s_hoplimit=%u", ndprefix, rap->hoplimit) == -1) return -1; pref = ipv6nd_rtpref(rap); - if (efprintf(fp, "%s_flags=%s%s%s%s", ndprefix, + if (efprintf(fp, "%s_flags=%s%s%s%s%s", ndprefix, rap->flags & ND_RA_FLAG_MANAGED ? "M" : "", rap->flags & ND_RA_FLAG_OTHER ? "O" : "", rap->flags & ND_RA_FLAG_HOME_AGENT ? "H" : "", - pref == RTPREF_HIGH ? "h" : pref == RTPREF_LOW ? "l" : "" - ) == -1) + pref == RTPREF_HIGH ? "h" : pref == RTPREF_LOW ? "l" : "", + rap->flags & ND_RA_FLAG_PROXY ? "P" : "") == -1) return -1; if (efprintf(fp, "%s_lifetime=%u", ndprefix, rap->lifetime) == -1) return -1; |
