diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-05-01 23:24:53 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-05-01 23:24:53 -0400 |
| commit | 898a23caa76f6755f45fce937dd09026abbd7dd8 (patch) | |
| tree | f134701164583901cfed3ce73954fe7337d317c1 | |
| parent | 4fb6f519289a3e8bf7f72f86fe5cde6f5a3034b6 (diff) | |
zebra: Fix crash on *BSD
The zns->ns pointer is not created until we get a callback
from the kernel that a ns exists. This should potentially
fix a crash in the *BSD code path.
Fixes: #2152
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | zebra/kernel_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 1a94807317..e60e05bcdf 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1386,7 +1386,7 @@ static void routing_socket(struct zebra_ns *zns) zlog_err("routing_socket: Can't raise privileges"); routing_sock = - ns_socket(AF_ROUTE, SOCK_RAW, 0, (ns_id_t)zns->ns->ns_id); + ns_socket(AF_ROUTE, SOCK_RAW, 0, zns->ns_id); if (routing_sock < 0) { if (zserv_privs.change(ZPRIVS_LOWER)) |
