Skip to content
New issue

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

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

Already on GitHub? # to your account

Add icmpv4 redirect message #107

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

ari23
Copy link
Contributor

@ari23 ari23 commented Jul 3, 2020

Description

Adds support for ICMPv4 Redirect Message defined in IETF RFC 792

Type of change

  • New protocol

Checklist

  • Associated tests
  • Associated documentation

@CLAassistant
Copy link

CLAassistant commented Jul 3, 2020

CLA assistant check
All committers have signed the CLA.


/// Sets the gateway ip address
#[inline]
fn set_gateway(&mut self, gateway: Ipv4Addr) {
Copy link
Member

Choose a reason for hiding this comment

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

you'll want to make this pub if it's settable, then the lint error should go away.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah good point!

Copy link
Member

@zeeshanlakhani zeeshanlakhani Jul 3, 2020

Choose a reason for hiding this comment

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

weirdly enough gh-actions doesn't see the change for some reason:

error: method is never used: `body_mut`
  --> core/src/packets/icmp/v4/redirect.rs:58:5
   |
58 |     fn body_mut(&mut self) -> &mut RedirectBody {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`

error: method is never used: `set_gateway`
  --> core/src/packets/icmp/v4/redirect.rs:70:5
   |
70 |     fn set_gateway(&mut self, gateway: Ipv4Addr) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@ari23 ari23 force-pushed the ari23/redirect-icmpv4 branch from 530abf9 to ca38432 Compare July 3, 2020 18:36
Copy link
Contributor

@drunkirishcoder drunkirishcoder left a comment

Choose a reason for hiding this comment

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

really great work! a few small comments.

@ari23 ari23 force-pushed the ari23/redirect-icmpv4 branch from ca38432 to ad592ba Compare July 6, 2020 17:14
Copy link
Contributor

@drunkirishcoder drunkirishcoder left a comment

Choose a reason for hiding this comment

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

👍 great work.

Copy link
Member

@zeeshanlakhani zeeshanlakhani left a comment

Choose a reason for hiding this comment

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

great work @ari23.

@zeeshanlakhani zeeshanlakhani merged commit c5e5e63 into capsule-rs:master Jul 7, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants