diff options
| author | Vincent JARDIN <vincent.jardin@6wind.com> | 2018-03-30 15:13:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-30 15:13:36 +0200 |
| commit | 588f0b6b497f090fa2411c1837edcbdefce54d02 (patch) | |
| tree | 95eec4156b7f7fdbaab05ba2adbb094376dcce94 /lib/table.c | |
| parent | a7e7b53f578967ada94f99ee8aa16e2b3aa81999 (diff) | |
| parent | 362a06e37d82eae495b386f85aa5106b8dc7dffc (diff) | |
Merge pull request #1817 from pguibert6WIND/flowspec_client
Flowspec client
Diffstat (limited to 'lib/table.c')
| -rw-r--r-- | lib/table.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/table.c b/lib/table.c index bf63609bc3..3adb793891 100644 --- a/lib/table.c +++ b/lib/table.c @@ -152,10 +152,16 @@ static void route_common(const struct prefix *n, const struct prefix *p, int i; uint8_t diff; uint8_t mask; + const uint8_t *np; + const uint8_t *pp; + uint8_t *newp; - const uint8_t *np = (const uint8_t *)&n->u.prefix; - const uint8_t *pp = (const uint8_t *)&p->u.prefix; - uint8_t *newp = (uint8_t *)&new->u.prefix; + if (n->family == AF_FLOWSPEC) + return prefix_copy(new, p); + np = (const uint8_t *)&n->u.prefix; + pp = (const uint8_t *)&p->u.prefix; + + newp = (uint8_t *)&new->u.prefix; for (i = 0; i < p->prefixlen / 8; i++) { if (np[i] == pp[i]) |
