diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-06-04 01:39:09 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-07-08 17:12:46 +0200 |
commit | 0d7b939fd063ceb825c3aed9c9915c674f2922ac (patch) | |
tree | 94143ba9845c5598e92398b9b385627909875306 /pbrd | |
parent | Merge pull request #8997 from donaldsharp/opaque_length (diff) | |
download | frr-0d7b939fd063ceb825c3aed9c9915c674f2922ac.tar.xz frr-0d7b939fd063ceb825c3aed9c9915c674f2922ac.zip |
pbrd: Start inclusion of src and dst ports for pbrd
Start the inclusion of src_prt and dst_prt in
the internal data structures. At this point
we do not do anything with the data other
than pass down what we have stored in pbrd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pbrd')
-rw-r--r-- | pbrd/pbr_map.h | 6 | ||||
-rw-r--r-- | pbrd/pbr_zebra.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/pbrd/pbr_map.h b/pbrd/pbr_map.h index caeadb064..567302477 100644 --- a/pbrd/pbr_map.h +++ b/pbrd/pbr_map.h @@ -85,6 +85,12 @@ struct pbr_map_sequence { uint32_t ruleno; /* + * src and dst ports + */ + uint16_t src_prt; + uint16_t dst_prt; + + /* * Our policy Catchers */ struct prefix *src; diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index fc5303c9d..8e21d24d0 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -535,9 +535,9 @@ static void pbr_encode_pbr_map_sequence(struct stream *s, stream_putl(s, pbrms->ruleno); stream_putl(s, pbrms->unique); pbr_encode_pbr_map_sequence_prefix(s, pbrms->src, family); - stream_putw(s, 0); /* src port */ + stream_putw(s, pbrms->src_prt); pbr_encode_pbr_map_sequence_prefix(s, pbrms->dst, family); - stream_putw(s, 0); /* dst port */ + stream_putw(s, pbrms->dst_prt); stream_putc(s, pbrms->dsfield); stream_putl(s, pbrms->mark); |