View | Details | Raw Unified | Return to bug 270126 | Differences between
and this patch

Collapse All | Expand All

(-)b/net-mgmt/fastnetmon/Makefile (-7 / +7 lines)
Lines 1-5 Link Here
1
PORTNAME=	fastnetmon
1
PORTNAME=	fastnetmon
2
PORTVERSION=	1.2.4
2
PORTVERSION=	1.2.4
3
PORTREVISION=	1
3
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
4
CATEGORIES=	net-mgmt security
5
CATEGORIES=	net-mgmt security
5
6
Lines 24-30 LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ Link Here
24
		libabsl_base.so:devel/abseil \
25
		libabsl_base.so:devel/abseil \
25
		libhiredis.so:databases/hiredis
26
		libhiredis.so:databases/hiredis
26
27
27
USES=	cmake compiler:c++11-lang pkgconfig localbase:ldflags ssl
28
USES=	cmake compiler:c++2b-lang pkgconfig localbase:ldflags ssl 
28
29
29
USE_GITHUB=	yes
30
USE_GITHUB=	yes
30
GH_ACCOUNT=	pavel-odintsov
31
GH_ACCOUNT=	pavel-odintsov
Lines 34-50 GROUPS= ${PORTNAME} Link Here
34
35
35
USE_RC_SUBR=	${PORTNAME}
36
USE_RC_SUBR=	${PORTNAME}
36
37
37
OPTIONS_DEFINE=	DOCS REDIS
38
OPTIONS_DEFINE=	DOCS
38
39
REDIS_LIB_DEPENDS=	libhiredis.so:databases/hiredis
40
39
41
PORTDOCS=	*
40
PORTDOCS=	*
42
41
43
CXXFLAGS += -DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
42
CXXFLAGS += -DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
44
CFLAGS_i386=	-march=i586
43
CFLAGS_i386=	-march=i586
45
CMAKE_SOURCE_PATH=	${WRKSRC}/src
44
CMAKE_SOURCE_PATH=	${WRKSRC}/src
46
CMAKE_ARGS+=	-DDISABLE_PF_RING_SUPPORT=ON \
45
CMAKE_ARGS+=	-DENABLE_NETMAP_SUPPORT=ON \
47
		-DENABLE_NETMAP_SUPPORT=OFF \
46
		-DENABLE_GOBGP_SUPPORT=ON \
48
		-DLINK_WITH_ABSL=ON \
47
		-DLINK_WITH_ABSL=ON \
49
		-DSET_ABSOLUTE_INSTALL_PATH=OFF \
48
		-DSET_ABSOLUTE_INSTALL_PATH=OFF \
50
		-DCMAKE_INSTALL_MANDIR=${PREFIX}/man
49
		-DCMAKE_INSTALL_MANDIR=${PREFIX}/man
Lines 64-70 post-patch: Link Here
64
post-install:
63
post-install:
65
	${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \
64
	${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \
66
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
65
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
67
	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon
66
	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks
67
	${TOUCH} ${STAGEDIR}/var/log/fastnetmon.log
68
	${INSTALL_SCRIPT} ${WRKSRC}/src/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin
68
	${INSTALL_SCRIPT} ${WRKSRC}/src/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin
69
69
70
post-install-DOCS-on:
70
post-install-DOCS-on:
(-)b/net-mgmt/fastnetmon/files/fastnetmon.in (-3 / +3 lines)
Lines 19-30 rcvar=fastnetmon_enable Link Here
19
load_rc_config "$name"
19
load_rc_config "$name"
20
20
21
: ${fastnetmon_enable:=NO}
21
: ${fastnetmon_enable:=NO}
22
: ${fastnetmon_conf:=%%ETCDIR%%/$name.conf}
22
: ${fastnetmon_conf:=%%PREFIX%%/etc/$name.conf}
23
: ${fastnetmon_flags:=--daemonize}
23
: ${fastnetmon_flags:=}
24
: ${fastnetmon_user:=fastnetmon}
24
: ${fastnetmon_user:=fastnetmon}
25
25
26
command=%%PREFIX%%/bin/fastnetmon
26
command=%%PREFIX%%/bin/fastnetmon
27
command_args="--configuration_file ${fastnetmon_conf} ${fastnetmon_flags}"
27
command_args="--daemonize --configuration_file ${fastnetmon_conf} ${fastnetmon_flags}"
28
pidfile=/var/run/fastnetmon/$name.pid
28
pidfile=/var/run/fastnetmon/$name.pid
29
29
30
run_rc_command "$1"
30
run_rc_command "$1"
(-)b/net-mgmt/fastnetmon/files/patch-src_actions_attribute.proto (+374 lines)
Added Link Here
1
--- src/actions/attribute.proto.orig	2023-03-01 15:23:34.000000000 +0100
2
+++ src/actions/attribute.proto	2023-03-12 18:51:08.820424000 +0100
3
@@ -22,13 +22,19 @@
4
 syntax = "proto3";
5
 
6
+package apipb;
7
+option go_package = "github.com/osrg/gobgp/v3/api;apipb";
8
+
9
 import "google/protobuf/any.proto";
10
 import "gobgp.proto";
11
 
12
-package gobgpapi;
13
 
14
 message OriginAttribute { uint32 origin = 1; }
15
 
16
 message AsSegment {
17
-  uint32 type = 1;
18
+  enum Type {
19
+    UNKNOWN = 0; AS_SET = 1; AS_SEQUENCE = 2;
20
+    AS_CONFED_SEQUENCE = 3; AS_CONFED_SET = 4;
21
+  }
22
+  Type type = 1;
23
   repeated uint32 numbers = 2;
24
 }
25
@@ -45,6 +51,6 @@
26
 
27
 message AggregatorAttribute {
28
-  uint32 as = 2;
29
-  string address = 3;
30
+  uint32 asn = 1;
31
+  string address = 2;
32
 }
33
 
34
@@ -77,5 +83,5 @@
35
 message EncapsulationNLRI { string address = 1; }
36
 
37
-message RouteDistinguisherTwoOctetAS {
38
+message RouteDistinguisherTwoOctetASN {
39
   uint32 admin = 1;
40
   uint32 assigned = 2;
41
@@ -87,5 +93,5 @@
42
 }
43
 
44
-message RouteDistinguisherFourOctetAS {
45
+message RouteDistinguisherFourOctetASN {
46
   uint32 admin = 1;
47
   uint32 assigned = 2;
48
@@ -101,7 +107,7 @@
49
 message EVPNEthernetAutoDiscoveryRoute {
50
   // One of:
51
-  // - RouteDistinguisherTwoOctetAS
52
-  // - RouteDistinguisherIPAddressAS
53
-  // - RouteDistinguisherFourOctetAS
54
+  // - RouteDistinguisherTwoOctetASN
55
+  // - RouteDistinguisherIPAddress
56
+  // - RouteDistinguisherFourOctetASN
57
   google.protobuf.Any rd = 1;
58
   EthernetSegmentIdentifier esi = 2;
59
@@ -114,7 +120,7 @@
60
 message EVPNMACIPAdvertisementRoute {
61
   // One of:
62
-  // - RouteDistinguisherTwoOctetAS
63
-  // - RouteDistinguisherIPAddressAS
64
-  // - RouteDistinguisherFourOctetAS
65
+  // - RouteDistinguisherTwoOctetASN
66
+  // - RouteDistinguisherIPAddress
67
+  // - RouteDistinguisherFourOctetASN
68
   google.protobuf.Any rd = 1;
69
   EthernetSegmentIdentifier esi = 2;
70
@@ -129,7 +135,7 @@
71
 message EVPNInclusiveMulticastEthernetTagRoute {
72
   // One of:
73
-  // - RouteDistinguisherTwoOctetAS
74
-  // - RouteDistinguisherIPAddressAS
75
-  // - RouteDistinguisherFourOctetAS
76
+  // - RouteDistinguisherTwoOctetASN
77
+  // - RouteDistinguisherIPAddress
78
+  // - RouteDistinguisherFourOctetASN
79
   google.protobuf.Any rd = 1;
80
   uint32 ethernet_tag = 2;
81
@@ -141,7 +147,7 @@
82
 message EVPNEthernetSegmentRoute {
83
   // One of:
84
-  // - RouteDistinguisherTwoOctetAS
85
-  // - RouteDistinguisherIPAddressAS
86
-  // - RouteDistinguisherFourOctetAS
87
+  // - RouteDistinguisherTwoOctetASN
88
+  // - RouteDistinguisherIPAddress
89
+  // - RouteDistinguisherFourOctetASN
90
   google.protobuf.Any rd = 1;
91
   EthernetSegmentIdentifier esi = 2;
92
@@ -153,7 +159,7 @@
93
 message EVPNIPPrefixRoute {
94
   // One of:
95
-  // - RouteDistinguisherTwoOctetAS
96
-  // - RouteDistinguisherIPAddressAS
97
-  // - RouteDistinguisherFourOctetAS
98
+  // - RouteDistinguisherTwoOctetASN
99
+  // - RouteDistinguisherIPAddress
100
+  // - RouteDistinguisherFourOctetASN
101
   google.protobuf.Any rd = 1;
102
   EthernetSegmentIdentifier esi = 2;
103
@@ -169,7 +175,7 @@
104
 message EVPNIPMSIRoute {
105
   // One of:
106
-  // - RouteDistinguisherTwoOctetAS
107
-  // - RouteDistinguisherIPAddressAS
108
-  // - RouteDistinguisherFourOctetAS
109
+  // - RouteDistinguisherTwoOctetASN
110
+  // - RouteDistinguisherIPAddress
111
+  // - RouteDistinguisherFourOctetASN
112
   google.protobuf.Any rd = 1;
113
   uint32 ethernet_tag = 2;
114
@@ -214,5 +220,5 @@
115
 // - AFI=1, SAFI=132
116
 message RouteTargetMembershipNLRI {
117
-  uint32 as = 1;
118
+  uint32 asn = 1;
119
   // One of:
120
   // - TwoOctetAsSpecificExtended
121
@@ -287,4 +293,6 @@
122
   bool pseudonode = 4;
123
   string igp_router_id = 5;
124
+  string bgp_router_id = 6;
125
+  uint32 bgp_confederation_member = 7;
126
 }
127
 
128
@@ -298,7 +306,17 @@
129
 }
130
 
131
+enum LsOspfRouteType {
132
+   LS_OSPF_ROUTE_TYPE_UNKNOWN = 0;
133
+   LS_OSPF_ROUTE_TYPE_INTRA_AREA = 1;
134
+   LS_OSPF_ROUTE_TYPE_INTER_AREA = 2;
135
+   LS_OSPF_ROUTE_TYPE_EXTERNAL1 = 3;
136
+   LS_OSPF_ROUTE_TYPE_EXTERNAL2 = 4;
137
+   LS_OSPF_ROUTE_TYPE_NSSA1 = 5;
138
+   LS_OSPF_ROUTE_TYPE_NSSA2 = 6;
139
+}
140
+
141
 message LsPrefixDescriptor {
142
   repeated string ip_reachability = 1;
143
-  string ospf_route_type = 2;
144
+  LsOspfRouteType ospf_route_type = 2;
145
 }
146
 
147
@@ -351,6 +369,49 @@
148
 }
149
 
150
+message MUPInterworkSegmentDiscoveryRoute {
151
+  // One of:
152
+  // - RouteDistinguisherTwoOctetASN
153
+  // - RouteDistinguisherIPAddress
154
+  // - RouteDistinguisherFourOctetASN
155
+  google.protobuf.Any rd = 1;
156
+  string prefix = 2;
157
+}
158
+
159
+message MUPDirectSegmentDiscoveryRoute {
160
+  // One of:
161
+  // - RouteDistinguisherTwoOctetASN
162
+  // - RouteDistinguisherIPAddress
163
+  // - RouteDistinguisherFourOctetASN
164
+  google.protobuf.Any rd = 1;
165
+  string address = 2;
166
+}
167
+
168
+message MUPType1SessionTransformedRoute {
169
+  // One of:
170
+  // - RouteDistinguisherTwoOctetASN
171
+  // - RouteDistinguisherIPAddress
172
+  // - RouteDistinguisherFourOctetASN
173
+  google.protobuf.Any rd = 1;
174
+  uint32 prefix_length = 2 [deprecated = true];
175
+  string prefix = 3;
176
+  uint32 teid = 4;
177
+  uint32 qfi = 5;
178
+  uint32 endpoint_address_length = 6;
179
+  string endpoint_address = 7;
180
+}
181
+
182
+message MUPType2SessionTransformedRoute {
183
+  // One of:
184
+  // - RouteDistinguisherTwoOctetASN
185
+  // - RouteDistinguisherIPAddress
186
+  // - RouteDistinguisherFourOctetASN
187
+  google.protobuf.Any rd = 1;
188
+  uint32 endpoint_address_length = 2;
189
+  string endpoint_address = 3;
190
+  uint32 teid = 4;
191
+}
192
+
193
 message MpReachNLRIAttribute {
194
-  gobgpapi.Family family = 1;
195
+  apipb.Family family = 1;
196
   repeated string next_hops = 2;
197
   // Each NLRI must be one of:
198
@@ -371,9 +432,13 @@
199
   // - LsAddrPrefix
200
   // - SR Policy NLRI
201
+  // - MUPInterworkSegmentDiscoveryRoute
202
+  // - MUPDirectSegmentDiscoveryRoute
203
+  // - MUPType1SessionTransformedRoute
204
+  // - MUPType2SessionTransformedRoute
205
   repeated google.protobuf.Any nlris = 3;
206
 }
207
 
208
 message MpUnreachNLRIAttribute {
209
-  gobgpapi.Family family = 1;
210
+  apipb.Family family = 1;
211
   // The same as NLRI field of MpReachNLRIAttribute
212
   repeated google.protobuf.Any nlris = 3;
213
@@ -383,5 +448,5 @@
214
   bool is_transitive = 1;
215
   uint32 sub_type = 2;
216
-  uint32 as = 3;
217
+  uint32 asn = 3;
218
   uint32 local_admin = 4;
219
 }
220
@@ -397,8 +462,13 @@
221
   bool is_transitive = 1;
222
   uint32 sub_type = 2;
223
-  uint32 as = 3;
224
+  uint32 asn = 3;
225
   uint32 local_admin = 4;
226
 }
227
 
228
+message LinkBandwidthExtended {
229
+  uint32 asn = 1;
230
+  float bandwidth = 2;
231
+}
232
+
233
 message ValidationExtended { uint32 state = 1; }
234
 
235
@@ -429,5 +499,5 @@
236
 
237
 message TrafficRateExtended {
238
-  uint32 as = 1;
239
+  uint32 asn = 1;
240
   float rate = 2;
241
 }
242
@@ -439,5 +509,5 @@
243
 
244
 message RedirectTwoOctetAsSpecificExtended {
245
-  uint32 as = 1;
246
+  uint32 asn = 1;
247
   uint32 local_admin = 2;
248
 }
249
@@ -449,5 +519,5 @@
250
 
251
 message RedirectFourOctetAsSpecificExtended {
252
-  uint32 as = 1;
253
+  uint32 asn = 1;
254
   uint32 local_admin = 2;
255
 }
256
@@ -455,4 +525,10 @@
257
 message TrafficRemarkExtended { uint32 dscp = 1; }
258
 
259
+message MUPExtended {
260
+  uint32 sub_type = 1;
261
+  uint32 segment_id2 = 2;
262
+  uint32 segment_id4 = 3;
263
+}
264
+
265
 message UnknownExtended {
266
   uint32 type = 1;
267
@@ -475,4 +551,5 @@
268
   // - RedirectFourOctetAsSpecificExtended
269
   // - TrafficRemarkExtended
270
+  // - MUPExtended
271
   // - UnknownExtended
272
   repeated google.protobuf.Any communities = 1;
273
@@ -482,5 +559,5 @@
274
 
275
 message As4AggregatorAttribute {
276
-  uint32 as = 2;
277
+  uint32 asn = 2;
278
   string address = 3;
279
 }
280
@@ -559,7 +636,11 @@
281
   ENDT_WITH_USP_USD = 38;
282
   ENDT_WITH_PSP_USP_USD = 39;
283
+  ENDM_GTP6D = 69; // 0x0045
284
+  ENDM_GTP6DI = 70; // 0x0046
285
+  ENDM_GTP6E = 71; // 0x0047
286
+  ENDM_GTP4E = 72; // 0x0048
287
 }
288
 
289
-message SRv6EndPpointBehavior {
290
+message SRv6EndPointBehavior {
291
   SRv6Behavior behavior = 1;
292
   uint32 block_len = 2;
293
@@ -574,5 +655,5 @@
294
   bool b_flag = 3;
295
   bytes sid = 4;
296
-  SRv6EndPpointBehavior endpoint_behavior_structure = 5;
297
+  SRv6EndPointBehavior endpoint_behavior_structure = 5;
298
 }
299
 
300
@@ -603,5 +684,6 @@
301
 message SegmentTypeB {
302
   SegmentFlags flags = 1;
303
-  uint32 label = 2;
304
+  bytes sid = 2;
305
+  SRv6EndPointBehavior endpoint_behavior_structure = 3;
306
 }
307
 
308
@@ -749,8 +831,28 @@
309
 }
310
 
311
+message LsBgpPeerSegmentSIDFlags {
312
+  bool value  = 1;
313
+  bool local = 2;
314
+  bool backup = 3;
315
+  bool persistent = 4;
316
+}
317
+
318
+message LsBgpPeerSegmentSID {
319
+  LsBgpPeerSegmentSIDFlags  flags = 1;
320
+  uint32 weight  = 2;
321
+  uint32 sid = 3;
322
+}
323
+
324
+message LsAttributeBgpPeerSegment {
325
+  LsBgpPeerSegmentSID bgp_peer_node_sid = 1;
326
+  LsBgpPeerSegmentSID bgp_peer_adjacency_sid = 2;
327
+  LsBgpPeerSegmentSID bgp_peer_set_sid = 3;
328
+}
329
+
330
 message LsAttribute {
331
   LsAttributeNode node = 1;
332
   LsAttributeLink link = 2;
333
   LsAttributePrefix prefix = 3;
334
+  LsAttributeBgpPeerSegment bgp_peer_segment = 4;
335
 }
336
 
337
@@ -761,8 +863,8 @@
338
 }
339
 
340
-// https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2.1.1
341
+// https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1
342
 message SRv6StructureSubSubTLV {
343
-  uint32 local_block_length = 1;
344
-  uint32 local_node_length = 2;
345
+  uint32 locator_block_length = 1;
346
+  uint32 locator_node_length = 2;
347
   uint32 function_length = 3;
348
   uint32 argument_length = 4;
349
@@ -788,5 +890,5 @@
350
 }
351
 
352
-// https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2
353
+// https://www.rfc-editor.org/rfc/rfc9252.html#section-2
354
 message SRv6L3ServiceTLV {
355
   // SRv6TLV is one of:
356
@@ -795,4 +897,11 @@
357
 }
358
 
359
+// https://www.rfc-editor.org/rfc/rfc9252.html#section-2
360
+message SRv6L2ServiceTLV {
361
+  // SRv6TLV is one of:
362
+  // - SRv6InformationSubTLV
363
+  map<uint32, SRv6TLV> sub_tlvs = 1;
364
+}
365
+
366
 // https://tools.ietf.org/html/rfc8669
367
 message PrefixSID {
368
@@ -801,5 +910,5 @@
369
   // - OriginatorSRGBTLV Type 3 (not yet implemented)
370
   // - SRv6L3ServiceTLV Type 5
371
-  // - SRv6L2ServiceTLV Type 6 (not yet implemented)
372
+  // - SRv6L2ServiceTLV Type 6
373
   repeated google.protobuf.Any tlvs = 1;
374
 }
(-)b/net-mgmt/fastnetmon/files/patch-src_actions_gobgp.proto (+393 lines)
Added Link Here
1
--- src/actions/gobgp.proto.orig	2023-03-01 15:23:34.000000000 +0100
2
+++ src/actions/gobgp.proto	2023-03-12 18:50:49.259773000 +0100
3
@@ -22,9 +22,11 @@
4
 syntax = "proto3";
5
 
6
+package apipb;
7
+option go_package = "github.com/osrg/gobgp/v3/api;apipb";
8
+
9
 import "google/protobuf/any.proto";
10
 import "google/protobuf/empty.proto";
11
 import "google/protobuf/timestamp.proto";
12
 
13
-package gobgpapi;
14
 
15
 // Interface exported by the server.
16
@@ -35,4 +37,6 @@
17
   rpc GetBgp(GetBgpRequest) returns(GetBgpResponse);
18
 
19
+  rpc WatchEvent(WatchEventRequest) returns(stream WatchEventResponse);
20
+
21
   rpc AddPeer(AddPeerRequest) returns(google.protobuf.Empty);
22
   rpc DeletePeer(DeletePeerRequest) returns(google.protobuf.Empty);
23
@@ -43,5 +47,4 @@
24
   rpc EnablePeer(EnablePeerRequest) returns(google.protobuf.Empty);
25
   rpc DisablePeer(DisablePeerRequest) returns(google.protobuf.Empty);
26
-  rpc MonitorPeer(MonitorPeerRequest) returns(stream MonitorPeerResponse);
27
 
28
   rpc AddPeerGroup(AddPeerGroupRequest) returns(google.protobuf.Empty);
29
@@ -60,5 +63,4 @@
30
 
31
   rpc GetTable(GetTableRequest) returns(GetTableResponse);
32
-  rpc MonitorTable(MonitorTableRequest) returns(stream MonitorTableResponse);
33
 
34
   rpc AddVrf(AddVrfRequest) returns(google.protobuf.Empty);
35
@@ -104,4 +106,5 @@
36
   rpc AddBmp(AddBmpRequest) returns(google.protobuf.Empty);
37
   rpc DeleteBmp(DeleteBmpRequest) returns(google.protobuf.Empty);
38
+  rpc ListBmp(ListBmpRequest) returns(stream ListBmpResponse);
39
 
40
   rpc SetLogLevel(SetLogLevelRequest) returns(google.protobuf.Empty);
41
@@ -116,4 +119,37 @@
42
 message GetBgpResponse { Global global = 1; }
43
 
44
+message WatchEventRequest {
45
+  message Peer {
46
+  }
47
+  Peer peer = 1;
48
+
49
+  message Table {
50
+    message Filter {
51
+      enum Type { BEST = 0; ADJIN = 1; POST_POLICY = 2; }
52
+      Type type = 1;
53
+      bool init = 2;
54
+    }
55
+    repeated Filter filters = 1;
56
+  }
57
+  Table table = 2;
58
+}
59
+
60
+message WatchEventResponse {
61
+  message PeerEvent {
62
+    enum Type { UNKNOWN = 0; INIT = 1; END_OF_INIT = 2; STATE = 3; }
63
+    Type type = 1;
64
+    Peer peer = 2;
65
+  }
66
+
67
+  message TableEvent {
68
+    repeated Path paths = 2;
69
+  }
70
+
71
+  oneof event {
72
+    PeerEvent peer = 2;
73
+    TableEvent table = 3;
74
+  }
75
+}
76
+
77
 message AddPeerRequest { Peer peer = 1; }
78
 
79
@@ -164,12 +200,4 @@
80
 }
81
 
82
-message MonitorPeerRequest {
83
-  string address = 1;
84
-  bool current = 2; // Prefer initial_state.
85
-  bool initial_state = 3;
86
-}
87
-
88
-message MonitorPeerResponse { Peer peer = 1; }
89
-
90
 message AddPeerGroupRequest { PeerGroup peer_group = 1; }
91
 
92
@@ -214,4 +242,12 @@
93
 }
94
 
95
+// API representation of table.LookupPrefix
96
+message TableLookupPrefix {
97
+  // API representation of table.LookupOption
98
+  enum Type { EXACT = 0; LONGER = 1; SHORTER = 2; }
99
+  string prefix = 1;
100
+  Type type = 2;
101
+}
102
+
103
 message ListPathRequest {
104
   TableType table_type = 1;
105
@@ -224,4 +260,7 @@
106
   bool enable_nlri_binary = 7;
107
   bool enable_attribute_binary = 8;
108
+  // enable_only_binary == true means that only nlri_binary and pattrs_binary
109
+  // will be used instead of nlri and pattrs for each Path in ListPathResponse.
110
+  bool enable_only_binary = 9;
111
 }
112
 
113
@@ -246,14 +285,4 @@
114
 }
115
 
116
-message MonitorTableRequest {
117
-  TableType table_type = 1;
118
-  string name = 2;
119
-  Family family = 3;
120
-  bool current = 4;
121
-  bool post_policy = 5;
122
-}
123
-
124
-message MonitorTableResponse { Path path = 1; }
125
-
126
 message AddVrfRequest { Vrf vrf = 1; }
127
 
128
@@ -376,5 +405,6 @@
129
 
130
 message EnableMrtRequest {
131
-  int32 dump_type = 1;
132
+  enum DumpType { UPDATES = 0; TABLE = 1; }
133
+  DumpType type = 1;
134
   string filename = 2;
135
   uint64 dump_interval = 3;
136
@@ -382,5 +412,7 @@
137
 }
138
 
139
-message DisableMrtRequest {}
140
+message DisableMrtRequest {
141
+  string filename = 1;
142
+}
143
 
144
 message AddBmpRequest {
145
@@ -399,4 +431,23 @@
146
 }
147
 
148
+message ListBmpRequest {}
149
+
150
+message ListBmpResponse {
151
+  message BmpStation {
152
+    message Conf {
153
+      string address = 1;
154
+      uint32 port = 2;
155
+    }
156
+    Conf conf = 1;
157
+    message State {
158
+      google.protobuf.Timestamp uptime = 1;
159
+      google.protobuf.Timestamp downtime = 2;
160
+    }
161
+    State state = 2;
162
+  }
163
+
164
+  BmpStation station = 1;
165
+}
166
+
167
 message Family {
168
   enum Afi {
169
@@ -412,4 +463,5 @@
170
     SAFI_LS = 71;
171
     SAFI_SR_POLICY = 73;
172
+    SAFI_MUP = 85;
173
     SAFI_MPLS_VPN = 128;
174
     SAFI_MPLS_VPN_MULTICAST = 129;
175
@@ -431,10 +483,10 @@
176
   }
177
 
178
-  enum Reason { REASOT_NONE = 0; REASON_AS = 1; REASON_LENGTH = 2; }
179
+  enum Reason { REASON_NONE = 0; REASON_ASN = 1; REASON_LENGTH = 2; }
180
 
181
   State state = 1;
182
   Reason reason = 2;
183
   repeated Roa matched = 3;
184
-  repeated Roa unmatched_as = 4;
185
+  repeated Roa unmatched_asn = 4;
186
   repeated Roa unmatched_length = 5;
187
 }
188
@@ -458,4 +510,8 @@
189
   // - LsAddrPrefix
190
   // - SRPolicyNLRI
191
+  // - MUPInterworkSegmentDiscoveryRoute
192
+  // - MUPDirectSegmentDiscoveryRoute
193
+  // - MUPType1SessionTransformedRoute
194
+  // - MUPType2SessionTransformedRoute
195
   google.protobuf.Any nlri = 1;
196
   // Each attribute must be one of *Attribute defined in
197
@@ -487,15 +543,4 @@
198
 }
199
 
200
-// API representation of table.LookupOption
201
-enum TableLookupOption {
202
-  LOOKUP_EXACT = 0; LOOKUP_LONGER = 1; LOOKUP_SHORTER = 2;
203
-}
204
-
205
-// API representation of table.LookupPrefix
206
-message TableLookupPrefix {
207
-  string prefix = 1;
208
-  TableLookupOption lookup_option = 2;
209
-}
210
-
211
 message Peer {
212
   ApplyPolicy apply_policy = 1;
213
@@ -509,4 +554,5 @@
214
   GracefulRestart graceful_restart = 9;
215
   repeated AfiSafi afi_safis = 10;
216
+  TtlSecurity ttl_security = 11;
217
 }
218
 
219
@@ -522,4 +568,5 @@
220
   GracefulRestart graceful_restart = 9;
221
   repeated AfiSafi afi_safis = 10;
222
+  TtlSecurity ttl_security = 11;
223
 }
224
 
225
@@ -541,21 +588,25 @@
226
 }
227
 
228
+enum PeerType { INTERNAL = 0; EXTERNAL = 1; }
229
+
230
+enum RemovePrivate { REMOVE_NONE = 0; REMOVE_ALL = 1; REPLACE = 2; }
231
+
232
 message PeerConf {
233
   string auth_password = 1;
234
   string description = 2;
235
-  uint32 local_as = 3;
236
+  uint32 local_asn = 3;
237
   string neighbor_address = 4;
238
-  uint32 peer_as = 5;
239
+  uint32 peer_asn = 5;
240
   string peer_group = 6;
241
-  uint32 peer_type = 7;
242
-  enum RemovePrivateAs { NONE = 0; ALL = 1; REPLACE = 2; }
243
-  RemovePrivateAs remove_private_as = 8;
244
+  PeerType type = 7;
245
+  RemovePrivate remove_private = 8;
246
   bool route_flap_damping = 9;
247
   uint32 send_community = 10;
248
   string neighbor_interface = 11;
249
   string vrf = 12;
250
-  uint32 allow_own_as = 13;
251
-  bool replace_peer_as = 14;
252
+  uint32 allow_own_asn = 13;
253
+  bool replace_peer_asn = 14;
254
   bool admin_down = 15;
255
+  bool send_software_version = 16;
256
 }
257
 
258
@@ -563,10 +614,9 @@
259
   string auth_password = 1;
260
   string description = 2;
261
-  uint32 local_as = 3;
262
-  uint32 peer_as = 4;
263
+  uint32 local_asn = 3;
264
+  uint32 peer_asn = 4;
265
   string peer_group_name = 5;
266
-  uint32 peer_type = 6;
267
-  enum RemovePrivateAs { NONE = 0; ALL = 1; REPLACE = 2; }
268
-  RemovePrivateAs remove_private_as = 7;
269
+  PeerType type = 6;
270
+  RemovePrivate remove_private = 7;
271
   bool route_flap_damping = 8;
272
   uint32 send_community = 9;
273
@@ -576,10 +626,9 @@
274
   string auth_password = 1;
275
   string description = 2;
276
-  uint32 local_as = 3;
277
-  uint32 peer_as = 4;
278
+  uint32 local_asn = 3;
279
+  uint32 peer_asn = 4;
280
   string peer_group_name = 5;
281
-  uint32 peer_type = 6;
282
-  enum RemovePrivateAs { NONE = 0; ALL = 1; REPLACE = 2; }
283
-  RemovePrivateAs remove_private_as = 7;
284
+  PeerType type = 6;
285
+  RemovePrivate remove_private = 7;
286
   bool route_flap_damping = 8;
287
   uint32 send_community = 9;
288
@@ -588,4 +637,9 @@
289
 }
290
 
291
+message TtlSecurity {
292
+  bool enabled = 1;
293
+  uint32 ttl_min = 2;
294
+}
295
+
296
 message EbgpMultihop {
297
   bool enabled = 1;
298
@@ -601,12 +655,12 @@
299
   string auth_password = 1;
300
   string description = 2;
301
-  uint32 local_as = 3;
302
+  uint32 local_asn = 3;
303
   Messages messages = 4;
304
   string neighbor_address = 5;
305
-  uint32 peer_as = 6;
306
+  uint32 peer_asn = 6;
307
   string peer_group = 7;
308
-  uint32 peer_type = 8;
309
+  PeerType type = 8;
310
   Queues queues = 9;
311
-  uint32 remove_private_as = 10;
312
+  RemovePrivate remove_private = 10;
313
   bool route_flap_damping = 11;
314
   uint32 send_community = 12;
315
@@ -762,10 +816,10 @@
316
 
317
 message EbgpConfig {
318
-  bool allow_multiple_as = 1;
319
+  bool allow_multiple_asn = 1;
320
   uint32 maximum_paths = 2;
321
 }
322
 
323
 message EbgpState {
324
-  bool allow_multiple_as = 1;
325
+  bool allow_multiple_asn = 1;
326
   uint32 maximum_paths = 2;
327
 }
328
@@ -879,15 +933,13 @@
329
 }
330
 
331
-enum MatchType { ANY = 0; ALL = 1; INVERT = 2; }
332
-
333
 message MatchSet {
334
-  MatchType match_type = 1;
335
+  enum Type { ANY = 0; ALL = 1; INVERT = 2; }
336
+  Type type = 1;
337
   string name = 2;
338
 }
339
 
340
-enum AsPathLengthType { EQ = 0; GE = 1; LE = 2; }
341
-
342
 message AsPathLength {
343
-  AsPathLengthType length_type = 1;
344
+  enum Type { EQ = 0; GE = 1; LE = 2; }
345
+  Type type = 1;
346
   uint32 length = 2;
347
 }
348
@@ -902,6 +954,5 @@
349
   int32 rpki_result = 7;
350
   enum RouteType {
351
-    ROUTE_TYPE_NONE = 0; ROUTE_TYPE_INTERNAL = 1; ROUTE_TYPE_EXTERNAL = 2;
352
-    ROUTE_TYPE_LOCAL = 3;
353
+    ROUTE_TYPE_NONE = 0; ROUTE_TYPE_INTERNAL = 1; ROUTE_TYPE_EXTERNAL = 2; ROUTE_TYPE_LOCAL = 3;
354
   }
355
   RouteType route_type = 8;
356
@@ -913,17 +964,15 @@
357
 enum RouteAction { NONE = 0; ACCEPT = 1; REJECT = 2; }
358
 
359
-enum CommunityActionType {
360
-  COMMUNITY_ADD = 0; COMMUNITY_REMOVE = 1; COMMUNITY_REPLACE = 2;
361
-}
362
-
363
 message CommunityAction {
364
-  CommunityActionType action_type = 1;
365
+  enum Type {
366
+    ADD = 0; REMOVE = 1; REPLACE = 2;
367
+  }
368
+  Type type = 1;
369
   repeated string communities = 2;
370
 }
371
 
372
-enum MedActionType { MED_MOD = 0; MED_REPLACE = 1; }
373
-
374
 message MedAction {
375
-  MedActionType action_type = 1;
376
+  enum Type { MOD = 0; REPLACE = 1; }
377
+  Type type = 1;
378
   int64 value = 2;
379
 }
380
@@ -980,5 +1029,5 @@
381
 
382
 message Roa {
383
-  uint32 as = 1;
384
+  uint32 asn = 1;
385
   uint32 prefixlen = 2;
386
   uint32 maxlen = 3;
387
@@ -1013,5 +1062,5 @@
388
 
389
 message Global {
390
-  uint32 as = 1;
391
+  uint32 asn = 1;
392
   string router_id = 2;
393
   int32 listen_port = 3;
(-)b/net-mgmt/fastnetmon/files/patch-src_actions_gobgp_action.cpp (+117 lines)
Added Link Here
1
--- src/actions/gobgp_action.cpp.orig	2023-03-12 19:12:13.943438000 +0100
2
+++ src/actions/gobgp_action.cpp	2023-03-12 19:20:39.135248000 +0100
3
@@ -30,5 +30,5 @@
4
 using grpc::Status;
5
 
6
-using gobgpapi::GobgpApi;
7
+using apipb::GobgpApi;
8
 
9
 class GrpcClient {
10
@@ -49,12 +49,12 @@
11
         context.set_deadline(deadline);
12
 
13
-        auto gobgp_ipv4_unicast_route_family = new gobgpapi::Family;
14
-        gobgp_ipv4_unicast_route_family->set_afi(gobgpapi::Family::AFI_IP);
15
-        gobgp_ipv4_unicast_route_family->set_safi(gobgpapi::Family::SAFI_UNICAST);
16
+        auto gobgp_ipv4_unicast_route_family = new apipb::Family;
17
+        gobgp_ipv4_unicast_route_family->set_afi(apipb::Family::AFI_IP);
18
+        gobgp_ipv4_unicast_route_family->set_safi(apipb::Family::SAFI_UNICAST);
19
 
20
-        gobgpapi::AddPathRequest request;
21
-        request.set_table_type(gobgpapi::TableType::GLOBAL);
22
+        apipb::AddPathRequest request;
23
+        request.set_table_type(apipb::TableType::GLOBAL);
24
 
25
-        gobgpapi::Path* current_path = new gobgpapi::Path;
26
+        apipb::Path* current_path = new apipb::Path;
27
 
28
         current_path->set_allocated_family(gobgp_ipv4_unicast_route_family);
29
@@ -66,5 +66,5 @@
30
         // Configure required announce
31
         google::protobuf::Any* current_nlri = new google::protobuf::Any;
32
-        gobgpapi::IPAddressPrefix current_ipaddrprefix;
33
+        apipb::IPAddressPrefix current_ipaddrprefix;
34
         current_ipaddrprefix.set_prefix(announced_address);
35
         current_ipaddrprefix.set_prefix_len(cidr_mask);
36
@@ -75,5 +75,5 @@
37
         // Updating OriginAttribute info for current_path
38
         google::protobuf::Any* current_origin = current_path->add_pattrs();
39
-        gobgpapi::OriginAttribute current_origin_t;
40
+        apipb::OriginAttribute current_origin_t;
41
         current_origin_t.set_origin(0);
42
         current_origin->PackFrom(current_origin_t);
43
@@ -81,5 +81,5 @@
44
         // Updating NextHopAttribute info for current_path
45
         google::protobuf::Any* current_next_hop = current_path->add_pattrs();
46
-        gobgpapi::NextHopAttribute current_next_hop_t;
47
+        apipb::NextHopAttribute current_next_hop_t;
48
         current_next_hop_t.set_next_hop(announced_prefix_nexthop);
49
         current_next_hop->PackFrom(current_next_hop_t);
50
@@ -87,5 +87,5 @@
51
         // Updating CommunitiesAttribute for current_path
52
         google::protobuf::Any* current_communities = current_path->add_pattrs();
53
-        gobgpapi::CommunitiesAttribute current_communities_t;
54
+        apipb::CommunitiesAttribute current_communities_t;
55
         current_communities_t.add_communities(community_as_32bit_int);
56
         current_communities->PackFrom(current_communities_t);
57
@@ -93,5 +93,5 @@
58
         request.set_allocated_path(current_path);
59
 
60
-        gobgpapi::AddPathResponse response;
61
+        apipb::AddPathResponse response;
62
 
63
         // Don't be confused by name, it also can withdraw announces
64
@@ -120,12 +120,12 @@
65
         context.set_deadline(deadline);
66
 
67
-        auto gobgp_ipv6_unicast_route_family = new gobgpapi::Family;
68
-        gobgp_ipv6_unicast_route_family->set_afi(gobgpapi::Family::AFI_IP6);
69
-        gobgp_ipv6_unicast_route_family->set_safi(gobgpapi::Family::SAFI_UNICAST);
70
+        auto gobgp_ipv6_unicast_route_family = new apipb::Family;
71
+        gobgp_ipv6_unicast_route_family->set_afi(apipb::Family::AFI_IP6);
72
+        gobgp_ipv6_unicast_route_family->set_safi(apipb::Family::SAFI_UNICAST);
73
 
74
-        gobgpapi::AddPathRequest request;
75
-        request.set_table_type(gobgpapi::TableType::GLOBAL);
76
+        apipb::AddPathRequest request;
77
+        request.set_table_type(apipb::TableType::GLOBAL);
78
 
79
-        gobgpapi::Path* current_path = new gobgpapi::Path;
80
+        apipb::Path* current_path = new apipb::Path;
81
 
82
         current_path->set_allocated_family(gobgp_ipv6_unicast_route_family);
83
@@ -137,5 +137,5 @@
84
         // Configure required announce
85
         google::protobuf::Any* current_nlri = new google::protobuf::Any;
86
-        gobgpapi::IPAddressPrefix current_ipaddrprefix;
87
+        apipb::IPAddressPrefix current_ipaddrprefix;
88
         current_ipaddrprefix.set_prefix(print_ipv6_address(client_ipv6.subnet_address));
89
         current_ipaddrprefix.set_prefix_len(client_ipv6.cidr_prefix_length);
90
@@ -146,5 +146,5 @@
91
         // Updating OriginAttribute info for current_path
92
         google::protobuf::Any* current_origin = current_path->add_pattrs();
93
-        gobgpapi::OriginAttribute current_origin_t;
94
+        apipb::OriginAttribute current_origin_t;
95
         current_origin_t.set_origin(0);
96
         current_origin->PackFrom(current_origin_t);
97
@@ -152,5 +152,5 @@
98
         // Updating NextHopAttribute info for current_path
99
         google::protobuf::Any* current_next_hop = current_path->add_pattrs();
100
-        gobgpapi::NextHopAttribute current_next_hop_t;
101
+        apipb::NextHopAttribute current_next_hop_t;
102
         current_next_hop_t.set_next_hop(print_ipv6_address(ipv6_next_hop.subnet_address));
103
         current_next_hop->PackFrom(current_next_hop_t);
104
@@ -158,5 +158,5 @@
105
         // Updating CommunitiesAttribute for current_path
106
         google::protobuf::Any* current_communities = current_path->add_pattrs();
107
-        gobgpapi::CommunitiesAttribute current_communities_t;
108
+        apipb::CommunitiesAttribute current_communities_t;
109
         current_communities_t.add_communities(community_as_32bit_int);
110
         current_communities->PackFrom(current_communities_t);
111
@@ -164,5 +164,5 @@
112
         request.set_allocated_path(current_path);
113
 
114
-        gobgpapi::AddPathResponse response;
115
+        apipb::AddPathResponse response;
116
 
117
         // Don't be confused by name, it also can withdraw announces
(-)b/net-mgmt/fastnetmon/files/patch-src_netmap_plugin_netmap_collector.hpp (+8 lines)
Added Link Here
1
--- src/netmap_plugin/netmap_collector.hpp.orig	2023-03-11 17:05:13.761571000 +0100
2
+++ src/netmap_plugin/netmap_collector.hpp	2023-03-11 16:59:34.769459000 +0100
3
@@ -1,4 +1,5 @@
4
 #ifndef NETMAP_PLUGIN_H
5
 #define NETMAP_PLUGIN_H
6
+#define NETMAP_API      14
7
 
8
 #include "../fastnetmon_types.hpp"
(-)b/net-mgmt/fastnetmon/pkg-plist (-1 / +2 lines)
Lines 8-11 man/man8/fastnetmon.8.gz Link Here
8
man/man1/fastnetmon_client.1.gz
8
man/man1/fastnetmon_client.1.gz
9
@sample etc/fastnetmon.conf.sample
9
@sample etc/fastnetmon.conf.sample
10
@dir(fastnetmon,fastnetmon) /var/run/fastnetmon
10
@dir(fastnetmon,fastnetmon) /var/run/fastnetmon
11
@dir(fastnetmon,fastnetmon) /var/log/fastnetmon
11
@dir(fastnetmon,fastnetmon) /var/log/fastnetmon_attacks
12
@(fastnetmon,fastnetmon) /var/log/fastnetmon.log

Return to bug 270126