lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Jun 2007 15:48:48 -0700 (PDT)
From:	David Miller <>
Subject: Re: [PATCH 2/5 2.6.22-rc6] L2TP: Changes to existing ppp and
 socket kernel headers for L2TP

From: James Chapman <>
Date: Wed, 27 Jun 2007 23:20:38 +0100

> Add struct sockaddr_pppol2tp to carry L2TP-specific address
> information for the PPPoX (PPPoL2TP) socket. Unfortunately we can't
> use the union inside struct sockaddr_pppox because the L2TP-specific
> data is larger than the current size of the union and we must preserve
> the size of struct sockaddr_pppox for binary compatibility.
> Also add a PPPIOCGL2TPSTATS ioctl to allow userspace to obtain
> L2TP counters and state from the kernel.
> Add new if_pppol2tp.h header.
> Signed-off-by: James Chapman <>


> +struct pppol2tp_ioc_stats {
> +	__u16	tunnel_id;	/* redundant */
> +	__u16	session_id;	/* if zero, get tunnel stats */
> +	__u32	using_ipsec:1;	/* valid only for session_id == 0 */
> +	__u64	tx_packets;
> +	__u64	tx_bytes;
> +	__u64	tx_errors;
> +	__u64	rx_packets;
> +	__u64	rx_bytes;
> +	__u64	rx_seq_discards;
> +	__u64	rx_oos_packets;
> +	__u64	rx_errors;
> +};

This is going to cause problems on compat platforms where
__u64 is aligned on an 8-byte boundary on the 64-bit
variant but it is not on the 32-bit cpu variant.

A way to avoid this is to use the aligned_u64 type from
linux/types.h which ensures 8-byte alignment on all
platforms and thus you won't need to provide s compat
ioctl() handler for your statistics ioctl().

I'll make this change for you so we don't have to go
back and forth again just for this.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists