diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2017-01-16 15:12:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-16 15:12:55 +0100 |
| commit | ab0c9543a9f3337b1d99727a438d1293ef8b2956 (patch) | |
| tree | 529e6476fdcd48500bcca77ef77b3d68da23f1c6 /zebra/ipforward_proc.c | |
| parent | 5731f9c9e57f5abfeff891fd036e9527bb14e023 (diff) | |
| parent | 602ba9bd8b118d3c1302e890010ca7c5d94e0ff5 (diff) | |
Merge pull request #68 from donaldsharp/cleanup
Cleanup
Diffstat (limited to 'zebra/ipforward_proc.c')
| -rw-r--r-- | zebra/ipforward_proc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c index 2876eded37..910fd61d06 100644 --- a/zebra/ipforward_proc.c +++ b/zebra/ipforward_proc.c @@ -123,7 +123,6 @@ ipforward_off (void) return ipforward (); } -#ifdef HAVE_IPV6 char proc_ipv6_forwarding[] = "/proc/sys/net/ipv6/conf/all/forwarding"; @@ -152,7 +151,7 @@ ipforward_ipv6_on (void) FILE *fp; if ( zserv_privs.change(ZPRIVS_RAISE) ) - zlog_err ("Can't raise privileges, %s", safe_strerror (errno)); + zlog_err ("Can't raise privileges, %s", safe_strerror (errno)); fp = fopen (proc_ipv6_forwarding, "w"); @@ -172,13 +171,14 @@ ipforward_ipv6_on (void) return ipforward_ipv6 (); } + int ipforward_ipv6_off (void) { FILE *fp; if ( zserv_privs.change(ZPRIVS_RAISE) ) - zlog_err ("Can't raise privileges, %s", safe_strerror (errno)); + zlog_err ("Can't raise privileges, %s", safe_strerror (errno)); fp = fopen (proc_ipv6_forwarding, "w"); @@ -197,4 +197,3 @@ ipforward_ipv6_off (void) return ipforward_ipv6 (); } -#endif /* HAVE_IPV6 */ |
