Check we manage the protocol before handling it.
| author |
Roy Marples <roy@marples.name> |
| date |
Mon, 02 Mar 2015 20:08:10 +0000 |
| parents |
7738b7a39516 |
| children |
1edbcf1a48ee |
| files |
ipv4.c ipv6.c |
| diffstat |
2 files changed, 6 insertions(+), 0 deletions(-)
[+]
|
line diff
--- a/ipv4.c Mon Mar 02 09:39:34 2015 +0000
+++ b/ipv4.c Mon Mar 02 20:08:10 2015 +0000
@@ -366,6 +366,9 @@
{
struct rt *f;
+ if (ctx->ipv4_kroutes == NULL)
+ return 0;
+
f = ipv4_findrt(ctx, rt, 1);
switch (cmd) {
case RTM_ADD:
--- a/ipv6.c Mon Mar 02 09:39:34 2015 +0000
+++ b/ipv6.c Mon Mar 02 20:08:10 2015 +0000
@@ -1767,6 +1767,9 @@
{
struct rt6 *f;
+ if (ctx->ipv6 == NULL)
+ return 0;
+
f = ipv6_findrt(ctx, rt, 1);
switch(cmd) {
case RTM_ADD: