* Add new Linux 3.16 constants to netinet/udp.h
@ 2014-09-10 17:24 Joseph S. Myers
2014-09-10 17:30 ` Florian Weimer
0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2014-09-10 17:24 UTC (permalink / raw)
To: libc-alpha
This patch adds the new constants UDP_NO_CHECK6_TX and
UDP_NO_CHECK6_RX from Linux 3.16 to sysdeps/gnu/netinet/udp.h. (I
believe the existing constants there are already Linux-specific,
possibly with the intention that other OSes should adopt the same
values if possible if adopting the features in question.)
Tested on x86_64.
2014-09-10 Joseph Myers <joseph@codesourcery.com>
* sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro.
(UDP_NO_CHECK6_RX): Likewise.
diff --git a/sysdeps/gnu/netinet/udp.h b/sysdeps/gnu/netinet/udp.h
index 32159cd..1f015ca 100644
--- a/sysdeps/gnu/netinet/udp.h
+++ b/sysdeps/gnu/netinet/udp.h
@@ -78,6 +78,8 @@ struct udphdr
#define UDP_CORK 1 /* Never send partially complete segments. */
#define UDP_ENCAP 100 /* Set the socket to accept
encapsulated packets. */
+#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X. */
+#define UDP_NO_CHECK6_RX 102 /* Disable accepting checksum for UDP6. */
/* UDP encapsulation types */
#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add new Linux 3.16 constants to netinet/udp.h
2014-09-10 17:24 Add new Linux 3.16 constants to netinet/udp.h Joseph S. Myers
@ 2014-09-10 17:30 ` Florian Weimer
2014-09-10 20:28 ` Joseph S. Myers
0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2014-09-10 17:30 UTC (permalink / raw)
To: Joseph S. Myers, libc-alpha
On 09/10/2014 07:24 PM, Joseph S. Myers wrote:
> +#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X. */
“UDP6X” appears to be a typo for “UDP6” in the kernel sources, but it
should actually say “UDP over IPv6” in our version because that's more
descriptive.
--
Florian Weimer / Red Hat Product Security
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add new Linux 3.16 constants to netinet/udp.h
2014-09-10 17:30 ` Florian Weimer
@ 2014-09-10 20:28 ` Joseph S. Myers
2014-09-12 11:39 ` Florian Weimer
0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2014-09-10 20:28 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Wed, 10 Sep 2014, Florian Weimer wrote:
> On 09/10/2014 07:24 PM, Joseph S. Myers wrote:
> > +#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X. */
>
> “UDP6X” appears to be a typo for “UDP6” in the kernel sources, but it should
> actually say “UDP over IPv6” in our version because that's more descriptive.
Here's a patch with the comments revised accordingly.
2014-09-10 Joseph Myers <joseph@codesourcery.com>
* sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro.
(UDP_NO_CHECK6_RX): Likewise.
diff --git a/sysdeps/gnu/netinet/udp.h b/sysdeps/gnu/netinet/udp.h
index 32159cd..8cc1c60 100644
--- a/sysdeps/gnu/netinet/udp.h
+++ b/sysdeps/gnu/netinet/udp.h
@@ -78,6 +78,10 @@ struct udphdr
#define UDP_CORK 1 /* Never send partially complete segments. */
#define UDP_ENCAP 100 /* Set the socket to accept
encapsulated packets. */
+#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP
+ over IPv6. */
+#define UDP_NO_CHECK6_RX 102 /* Disable accepting checksum for UDP
+ over IPv6. */
/* UDP encapsulation types */
#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Add new Linux 3.16 constants to netinet/udp.h
2014-09-10 20:28 ` Joseph S. Myers
@ 2014-09-12 11:39 ` Florian Weimer
0 siblings, 0 replies; 4+ messages in thread
From: Florian Weimer @ 2014-09-12 11:39 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-alpha
On 09/10/2014 10:28 PM, Joseph S. Myers wrote:
> On Wed, 10 Sep 2014, Florian Weimer wrote:
>
>> On 09/10/2014 07:24 PM, Joseph S. Myers wrote:
>>> +#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X. */
>>
>> “UDP6X” appears to be a typo for “UDP6” in the kernel sources, but it should
>> actually say “UDP over IPv6” in our version because that's more descriptive.
>
> Here's a patch with the comments revised accordingly.
Thanks. Looks good to me.
--
Florian Weimer / Red Hat Product Security
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-12 11:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 17:24 Add new Linux 3.16 constants to netinet/udp.h Joseph S. Myers
2014-09-10 17:30 ` Florian Weimer
2014-09-10 20:28 ` Joseph S. Myers
2014-09-12 11:39 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).