[vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-01 Thread Shiva Shankar
Hi folks,
I was going through ip6 code, and observed VPP skips calculating UDP
checksum for packets with explicit zero checksum, and process the packet
"normally".  (This, after disabling HW checksum offload)

But, as per RFC-2460,
"*IPv6 receivers must discard UDP packets containing a zero checksum, and
should log **the error*."

Is this expected behavior from VPP? Or will it be modified to be RFC
compliant?

Thanks
Shiva
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15009): https://lists.fd.io/g/vpp-dev/message/15009
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Ole Troan
Hi Shiva,

> I was going through ip6 code, and observed VPP skips calculating UDP checksum 
> for packets with explicit zero checksum, and process the packet "normally".  
> (This, after disabling HW checksum offload)
> 
> But, as per RFC-2460, 
> "IPv6 receivers must discard UDP packets containing a zero checksum, and 
> should log the error."
> 
> Is this expected behavior from VPP? Or will it be modified to be RFC 
> compliant? 

The IPv6 UDP checksum behaviour was updated with RFC6935 and RFC6936.
In VPP we basically leave it up to the application to decide if it requires the 
UDP checksum or not.

Best regards,
Ole

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15010): https://lists.fd.io/g/vpp-dev/message/15010
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Shiva Shankar
Hi Ole,
Thank you for your reply.

I am not using any tunneling protocol in my case(IPV6+UDP+ payload)

RFC 6935 says,
"The update is specified for use by a tunnel protocol that transports  packets
that are themselves protected by a checksum."

>>> In VPP we basically leave it up to the application to decide if it
requires the UDP checksum or not.
So, will VPP maintain the same behavior even for non-tunneled IPV6 UDP
datagrams?

Thanks
Shiva

On Thu, Jan 2, 2020 at 4:03 PM  wrote:

> Hi Shiva,
>
> > I was going through ip6 code, and observed VPP skips calculating UDP
> checksum for packets with explicit zero checksum, and process the packet
> "normally".  (This, after disabling HW checksum offload)
> >
> > But, as per RFC-2460,
> > "IPv6 receivers must discard UDP packets containing a zero checksum, and
> should log the error."
> >
> > Is this expected behavior from VPP? Or will it be modified to be RFC
> compliant?
>
> The IPv6 UDP checksum behaviour was updated with RFC6935 and RFC6936.
> In VPP we basically leave it up to the application to decide if it
> requires the UDP checksum or not.
>
> Best regards,
> Ole
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15011): https://lists.fd.io/g/vpp-dev/message/15011
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Ole Troan
Shiva,

> I am not using any tunneling protocol in my case(IPV6+UDP+ payload)
> 
> RFC 6935 says, 
> "The update is specified for use by a tunnel protocol that transports  
> packets that are themselves protected by a checksum."
> 
> >>> In VPP we basically leave it up to the application to decide if it 
> >>> requires the UDP checksum or not.
> So, will VPP maintain the same behavior even for non-tunneled IPV6 UDP 
> datagrams?

Which application of UDP are you specifically referring to?

Cheers,
Ole-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15012): https://lists.fd.io/g/vpp-dev/message/15012
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Shiva Shankar
Forgot to add "reply-all", My apologies.

Ole,
>>> Right, so if you do not want to accept UDP zero checksum packets in
your application, add the check in your code.
I Agree. Just curious to know the design choice.

So, by design, VPP hands over the UDP packet to "registered node"
irrespective of the payload.
Is that correct?

Thanks
Shiva




On Thu, Jan 2, 2020 at 5:12 PM  wrote:

> Shiva,
>
> > I am running a custom VPP node that registers to a specific UDP port
> (network is using IP6 protocol).
>
> Right, so if you do not want to accept UDP zero checksum packets in your
> application, add the check in your code.
>
> Best regards,
> Ole
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15017): https://lists.fd.io/g/vpp-dev/message/15017
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Ole Troan
Hi Shiva,

> Forgot to add "reply-all", My apologies. 
> 
> Ole, 
> >>> Right, so if you do not want to accept UDP zero checksum packets in your 
> >>> application, add the check in your code.
> I Agree. Just curious to know the design choice.  
> 
> So, by design, VPP hands over the UDP packet to "registered node" 
> irrespective of the payload. 
> Is that correct?

Yes that's correct. The UDP dispatcher can obviously not know anything about 
the UDP payload.
There is very little to UDP. The VPP local IP handling only provides a demux 
point based on the destination port.
And IP reassembly.
The rest is up to the UDP application.

https://git.fd.io/vpp/tree/src/vnet/udp/udp_local.c#n57

Best regards,
Ole-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15018): https://lists.fd.io/g/vpp-dev/message/15018
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] IPv6 UDP Datagrams with Zero Checksum- RFC complaint ?

2020-01-02 Thread Shiva Shankar
Ole,
Got it.

I did go through udp local code previously and found
we are doing only UDP dear port based and error handling in the node.

Anyway , Thankyou so much for responding  patiently.

Thanks
Shiva



On Thu, 2 Jan 2020 at 18:11,  wrote:

> Hi Shiva,
>
> > Forgot to add "reply-all", My apologies.
> >
> > Ole,
> > >>> Right, so if you do not want to accept UDP zero checksum packets in
> your application, add the check in your code.
> > I Agree. Just curious to know the design choice.
> >
> > So, by design, VPP hands over the UDP packet to "registered node"
> irrespective of the payload.
> > Is that correct?
>
> Yes that's correct. The UDP dispatcher can obviously not know anything
> about the UDP payload.
> There is very little to UDP. The VPP local IP handling only provides a
> demux point based on the destination port.
> And IP reassembly.
> The rest is up to the UDP application.
>
> https://git.fd.io/vpp/tree/src/vnet/udp/udp_local.c#n57
>
> Best regards,
> Ole
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15019): https://lists.fd.io/g/vpp-dev/message/15019
Mute This Topic: https://lists.fd.io/mt/69364719/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-