NetSys / NetBricks

NetBricks: A new network function framework based on Rust.
ISC License
464 stars 75 forks source link

question to packet.rs #84

Closed rstade closed 6 years ago

rstade commented 6 years ago

Hi, first of all congratulations for this excellent work! I really like your approach of applying functions to packets vs. the traditional transporting packets to functions approach. I think this is absolutely the right way to go.

Just a question to your code in "packet.rs" line 312. In my view this statement "let header=self.payload();" hides the "header"-argument of the push_header function. I commented that line out and the code works fine for me. Or what is the intention of this line of code?

apanda commented 6 years ago

Good point, that is a bug. Thanks for reporting it, sorry about any trouble it might have caused.

apanda commented 6 years ago

Fixed by f8c0f118 -- it is slighly more involved than just removing the line.