Commit 9aa8d1dc authored by Jan Maria Matejka's avatar Jan Maria Matejka
Browse files

Flowspec formatting: removed excessive spaces

parent 9833c0f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -558,6 +558,7 @@ prefix p;
	bt_assert(p !~ [ 10.0.0.0/8 ] );

	bt_assert(format(flow4 { dst 10.0.0.0/8; proto = 23; }) = "flow4 { dst 10.0.0.0/8; proto 23; }");
	print(flow4 { dst 10.0.0.0/8; proto = 23; });
	bt_assert(format(flow6 { dst ::1/128; src ::2/127; }) = "flow6 { dst ::1/128; src ::2/127; }");
	bt_assert(format(flow6 { next header false 42; }) = "flow6 { next header false 42; }");
	bt_assert(format(flow6 { port 80; }) = "flow6 { port 80; }");
+2 −2
Original line number Diff line number Diff line
@@ -584,7 +584,7 @@ t_formatting4(void)

  const char *expect = "flow4 { dst 10.0.0.0/8; proto 23; dport > 24 && < 30 || 40..50,60..70,80 && >= 90; sport > 24 && < 30 || 40,50,60..70,80; icmp type 80; icmp code 90; tcp flags 0x3/0x3,0x0/0xc; length 0..65535; dscp 63; fragment dont_fragment || !is_fragment; }";

  bt_assert(flow4_net_format(b, sizeof(b), input) == strlen(expect));
  bt_assert(flow4_net_format(b, sizeof(b), input, " ") == strlen(expect));
  bt_debug(" expect: '%s',\n output: '%s'\n", expect, b);
  bt_assert(strcmp(b, expect) == 0);

@@ -611,7 +611,7 @@ t_formatting6(void)

  const char *expect = "flow6 { dst ::1:1234:5678:9800:0/103 offset 61; src c000::/8; next header 6; port 20..40,273; label !0x0/0x12345678; }";

  bt_assert(flow6_net_format(b, sizeof(b), input) == strlen(expect));
  bt_assert(flow6_net_format(b, sizeof(b), input, " ") == strlen(expect));
  bt_debug(" expect: '%s',\n output: '%s'\n", expect, b);
  bt_assert(strcmp(b, expect) == 0);

+5 −5

File changed.

Contains only whitespace changes.