Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pimd: IGMPv3 conformance fixes for invalid TTL and invalid TOS #9074

Merged
merged 3 commits into from
Jul 20, 2021

Conversation

mobash-rasool
Copy link
Contributor

  1. IGMPv3 packets with invalid TTL should be dropped.
    Test Case ID: 4.10
    TEST_DESCRIPTION
    Every IGMP message described in this document is sent with an IP
    Time-to-Live of 1 (Tests that IGMPv3 Membership Report Message
    conforms to above statement)
    TEST_REFERENCE
    NEGATIVE: RFC 3376, IGMP Version 3, s4 p7 Message Formats
    Issue: FRR accept IGMPv3 report sent with invalid TTL  #9070

  2. IGMPv3 packets with invalid TOS should be dropped.
    Test Case ID: 4.10
    TEST_DESCRIPTION
    Every IGMP message described in this document is sent with
    IP Precedence of Internetwork Control (e.g., Type of Service
    0xc0)
    (Tests that IGMPv3 Membership Query Message conforms to
    above statement)
    TEST_REFERENCE
    NEGATIVE: RFC 3376, IGMP Version 3, s4 p7 Message Formats
    Issue: IGMPv3 report sent in response to invalid TOS query #9071

Signed-off-by: Mobashshera Rasool mrasool@vmware.com

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/7b7937e64ed8b04c2d15b8859066d1c6/raw/af604b851750f9d4d413076c6aae1f74d09df948/cr_9074_1626437543.diff | git apply

diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 7e82ee4f1..46848a0c1 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -490,7 +490,7 @@ int pim_igmp_verify_header(struct ip *ip_hdr, size_t len, int igmp_msg_len,
 			zlog_warn(
 				"Recv IGMP packet with invalid ttl=%u, discarding the packet",
 				ip_hdr->ip_ttl);
-				return -1;
+			return -1;
 		}
 	}
 
@@ -545,9 +545,9 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
 
 	if (pim_igmp_verify_header(ip_hdr, len, igmp_msg_len, msg_type) == -1) {
 		zlog_warn(
-                        "Recv IGMP packet from %s to %s on %s: size=%zu ttl=%u msg_type=%d msg_size=%d",
-                        from_str, to_str, igmp->interface->name, len,
-                        ip_hdr->ip_ttl, msg_type, igmp_msg_len);
+			"Recv IGMP packet from %s to %s on %s: size=%zu ttl=%u msg_type=%d msg_size=%d",
+			from_str, to_str, igmp->interface->name, len,
+			ip_hdr->ip_ttl, msg_type, igmp_msg_len);
 		return -1;
 	}
 

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 16, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/9074 0a16411
Date 07/16/2021
Start 08:15:51
Finish 08:41:15
Run-Time 25:24
Total 1813
Pass 1813
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-16-08:15:51.txt
Log autoscript-2021-07-16-08:17:08.log.bz2
Memory 517 497 429

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 16, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/9074 ef257d4
Date 07/16/2021
Start 09:37:36
Finish 10:03:08
Run-Time 25:32
Total 1813
Pass 1813
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-16-09:37:36.txt
Log autoscript-2021-07-16-09:38:49.log.bz2
Memory 517 485 431

For details, please contact louberger

@mobash-rasool
Copy link
Contributor Author

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 19, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20340/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 amd64 part 9: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 9: No useful log found
Topotests debian 10 amd64 part 5: Failed (click for details) Topotests debian 10 amd64 part 5: No useful log found
Topotests debian 10 amd64 part 0: Failed (click for details) Topotests debian 10 amd64 part 0: No useful log found
Topotests Ubuntu 18.04 i386 part 2: Failed (click for details) Topotests Ubuntu 18.04 i386 part 2: No useful log found
Topotests Ubuntu 18.04 i386 part 3: Failed (click for details) Topotests Ubuntu 18.04 i386 part 3: No useful log found
Topotests debian 10 amd64 part 1: Failed (click for details) Topotests debian 10 amd64 part 1: No useful log found
Topotests Ubuntu 18.04 i386 part 7: Failed (click for details) Topotests Ubuntu 18.04 i386 part 7: No useful log found
Topotests Ubuntu 18.04 amd64 part 0: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 0: No useful log found
Topotests Ubuntu 18.04 amd64 part 2: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 2: No useful log found
Topotests Ubuntu 18.04 i386 part 4: Failed (click for details) Topotests Ubuntu 18.04 i386 part 4: No useful log found
Topotests Ubuntu 18.04 i386 part 1: Failed (click for details) Topotests Ubuntu 18.04 i386 part 1: No useful log found
Topotests Ubuntu 18.04 i386 part 6: Failed (click for details) Topotests Ubuntu 18.04 i386 part 6: No useful log found
Topotests Ubuntu 18.04 arm8 part 8: Failed (click for details) Topotests Ubuntu 18.04 arm8 part 8: No useful log found
Topotests debian 10 amd64 part 2: Failed (click for details) Topotests debian 10 amd64 part 2: No useful log found
Topotests Ubuntu 18.04 amd64 part 6: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 6: No useful log found
Topotests debian 10 amd64 part 4: Failed (click for details) Topotests debian 10 amd64 part 4: No useful log found
Topotests Ubuntu 18.04 amd64 part 1: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 1: No useful log found
Topotests Ubuntu 18.04 i386 part 5: Failed (click for details) Topotests Ubuntu 18.04 i386 part 5: No useful log found
Topotests debian 10 amd64 part 8: Failed (click for details) Topotests debian 10 amd64 part 8: No useful log found
Topotests Ubuntu 18.04 amd64 part 5: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 5: No useful log found
Topotests Ubuntu 18.04 amd64 part 3: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 3: No useful log found
Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 4: No useful log found
Topotests Ubuntu 18.04 amd64 part 7: Failed (click for details) Topotests Ubuntu 18.04 amd64 part 7: No useful log found
Topotests Ubuntu 18.04 i386 part 0: Failed (click for details) Topotests Ubuntu 18.04 i386 part 0: No useful log found
Topotests debian 10 amd64 part 9: Failed (click for details) Topotests debian 10 amd64 part 9: No useful log found
Successful on other platforms/tests
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 amd64 part 8
  • Addresssanitizer topotests part 2
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 arm8 part 7
  • Addresssanitizer topotests part 9
  • Addresssanitizer topotests part 4
  • Topotests debian 10 amd64 part 6
  • Ubuntu 16.04 deb pkg check
  • Addresssanitizer topotests part 5
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 arm8 part 0
  • Addresssanitizer topotests part 0
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests debian 10 amd64 part 3
  • Static analyzer (clang)
  • Ubuntu 18.04 deb pkg check
  • Addresssanitizer topotests part 3
  • Addresssanitizer topotests part 1
  • IPv6 protocols on Ubuntu 18.04
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Addresssanitizer topotests part 6
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 9
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 2
  • Ubuntu 20.04 deb pkg check
  • IPv4 ldp protocol on Ubuntu 18.04
  • Debian 9 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 4

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all this really should be 3 commits -> abstracting the header verification
-> add ttl check
-> add tos check

Commits should be 1 logical thing. Instead we get 3 here

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one
Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/422fa04b5b9d9b911948484487a02010/raw/53acfaeabb7f79b94fa04116fe1316c81df41ae0/cr_9074_1626723289.diff | git apply

diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 0f0283776..477cf991b 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -470,7 +470,7 @@ static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from,
 }
 
 bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, int igmp_msg_len,
-			   int msg_type)
+			    int msg_type)
 {
 	if (len < sizeof(*ip_hdr)) {
 		zlog_warn("IGMP packet size=%zu shorter than minimum=%zu", len,
diff --git a/pimd/pim_igmp.h b/pimd/pim_igmp.h
index 4ad49f9d3..88324b793 100644
--- a/pimd/pim_igmp.h
+++ b/pimd/pim_igmp.h
@@ -117,7 +117,7 @@ void igmp_sock_free(struct igmp_sock *igmp);
 void igmp_sock_delete_all(struct interface *ifp);
 int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len);
 bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, int igmp_msg_len,
-			   int msg_type);
+			    int msg_type);
 void pim_igmp_general_query_on(struct igmp_sock *igmp);
 void pim_igmp_general_query_off(struct igmp_sock *igmp);
 void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp);

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

Moving the header verification checks inside a function.

Signed-off-by: Mobashshera Rasool <mrassol@vmware.com>
IGMPv3 packets with invalid TTL should be dropped.
Test Case ID: 4.10
TEST_DESCRIPTION
Every IGMP message described in this document is sent with an IP
Time-to-Live of 1 (Tests that IGMPv3 Membership Report Message
conforms to above statement)
TEST_REFERENCE
NEGATIVE: RFC 3376, IGMP Version 3, s4 p7 Message Formats
Issue: FRRouting#9070

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
IGMPv3 packets with invalid TOS should be dropped.
Test Case ID: 4.10
TEST_DESCRIPTION
Every IGMP message described in this document is sent with
IP Precedence of Internetwork Control (e.g., Type of Service
0xc0)
(Tests that IGMPv3 Membership Query Message conforms to
above statement)
TEST_REFERENCE
NEGATIVE: RFC 3376, IGMP Version 3, s4 p7 Message Formats
Issue: FRRouting#9071

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
@polychaeta polychaeta dismissed stale reviews from themself July 19, 2021 19:46

blocking comments addressed

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 19, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/9074 9540357
Date 07/19/2021
Start 15:35:50
Finish 16:01:26
Run-Time 25:36
Total 1813
Pass 1813
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-19-15:35:50.txt
Log autoscript-2021-07-19-15:37:05.log.bz2
Memory 473 517 430

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 19, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/9074 e39f74d
Date 07/19/2021
Start 16:32:06
Finish 16:57:42
Run-Time 25:36
Total 1813
Pass 1813
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-19-16:32:06.txt
Log autoscript-2021-07-19-16:33:22.log.bz2
Memory 521 514 419

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 20, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20360/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 20, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20361/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 20, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20362/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 20, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20363/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 amd64 part 1: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1804AMD64-20363/test

Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 1:

2021-07-19 21:15:12,682 ERROR: 'router_json_cmp' failed after 168.65 seconds
2021-07-19 21:15:12,686 ERROR: assert failed at "bfd_topo3.test_bfd_topo3/test_wait_bfd_convergence": "r1" BFD configuration failure
assert Generated JSON diff error report:
  
  > $: d2 has the following element at index 1 which is not present in d1: 
  
  	{
  	    "echo-transmit-interval": 0,
  	    "status": "up",
  	    "detect-multiplier": 3,
  	    "remote-receive-interval": 600,
  	    "receive-interval": 600,
  	    "remote-diagnostic": "ok",
  	    "uptime": "*",
  	    "diagnostic": "ok",
  	    "multihop": false,
  	    "interface": "r1-eth0",
  	    "remote-echo-receive-interval": 50,
  	    "transmit-interval": 600,
  	    "passive-mode": true,
  	    "remote-transmit-interval": 600,
  	    "peer": "2001:db8:1::2",
  	    "echo-receive-interval": 50,
  	    "remote-id": "*",
  	    "local": "2001:db8:1::1",
  	    "id": "*",
  	    "remote-detect-multiplier": 3,
  	    "vrf": "default"
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $[0]: d2 has key 'uptime' which is not present in d1
  	> $[0]->status: d1 has element with value 'init' but in d2 it has value 'up'
  	> $[0]->remote-receive-interval: d1 has element with value '1000' but in d2 it has value '600'
  	> $[0]->remote-transmit-interval: d1 has element with value '1000' but in d2 it has value '600'
  
2021-07-19 21:43:52,562 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/bgp.py", line 204, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 590, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 
% Specify remote-as or peer-group commands first
line 7: Failure to communicate[13] to bgpd, line: neighbor 10.0.0.13 timers 3 10 

line 9: % Unknown command[30]: neighbor fd00:0:0:3::1 remote-as 0 
% Specify remote-as or peer-group commands first
line 11: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 activate 

% Specify remote-as or peer-group commands first
line 12: Failure to communicate[13] to bgpd, line: neighbor fd00:0:0:3::1 timers 3 10 

% Specify remote-as or peer-group commands first
line 14: Failure to communicate[13] to bgpd, line: no neighbor fd00:0:0:3::1 activate 



2021-07-19 21:43:53,101 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/bgp.py", line 204, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 590, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20363/artifact/TP1U1804AMD64/ErrorLog/log_topotests.txt

Successful on other platforms/tests
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests Ubuntu 18.04 arm8 part 9
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 amd64 part 9
  • Static analyzer (clang)
  • Topotests debian 10 amd64 part 9
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 0
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests debian 10 amd64 part 6
  • Addresssanitizer topotests part 4
  • Topotests Ubuntu 18.04 amd64 part 5
  • Ubuntu 18.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 4
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests debian 10 amd64 part 4
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 i386 part 2
  • Addresssanitizer topotests part 0
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests debian 10 amd64 part 5
  • IPv6 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 arm8 part 8
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 amd64 part 2
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 3
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests debian 10 amd64 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests debian 10 amd64 part 8
  • Addresssanitizer topotests part 2
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests Ubuntu 18.04 i386 part 5
  • Debian 9 deb pkg check
  • Addresssanitizer topotests part 3
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 3

@mobash-rasool
Copy link
Contributor Author

ci:rerun

@mobash-rasool
Copy link
Contributor Author

All in all this really should be 3 commits -> abstracting the header verification
-> add ttl check
-> add tos check

Commits should be 1 logical thing. Instead we get 3 here

Fixed it.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20380/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@donaldsharp donaldsharp merged commit b57d3da into FRRouting:master Jul 20, 2021
@@ -479,17 +518,8 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
char from_str[INET_ADDRSTRLEN];
char to_str[INET_ADDRSTRLEN];

if (len < sizeof(*ip_hdr)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not correct to move this check to pim_igmp_verify_header.
You're using header fields before the call to this function.
Please, move it back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mobash-rasool please fix this and the next comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay sure, will check and raise a new PR.

@@ -501,22 +531,26 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)

igmp_msg = buf + ip_hlen;
igmp_msg_len = len - ip_hlen;

if (igmp_msg_len < PIM_IGMP_MIN_LEN) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants