Skip to content

Commit 95befb4

Browse files
committed
Bump NFT_*_MAXNAMELEN to 256
1 parent fe49994 commit 95befb4

File tree

1 file changed

+14
-5
lines changed
  • src/unix/notbsd/linux/other

1 file changed

+14
-5
lines changed

src/unix/notbsd/linux/other/mod.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,22 @@ pub const NFPROTO_IPV6: ::c_int = 10;
625625
pub const NFPROTO_DECNET: ::c_int = 12;
626626
pub const NFPROTO_NUMPROTO: ::c_int = 13;
627627

628-
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
629-
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
630-
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
631-
cfg_if! {
632-
if #[cfg(not(target_arch = "sparc64"))] {
628+
cfg_if!{
629+
if #[cfg(any(target_arch = "arm", target_arch = "powerpc",
630+
target_arch = "powerpc64", target_arch = "aarch64"))] {
631+
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
632+
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
633+
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
633634
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
635+
} else if #[cfg(target_arch = "sparc64")] {
636+
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
637+
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
638+
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
634639
} else {
640+
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
641+
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
642+
pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
643+
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
635644
}
636645
}
637646
pub const NFT_USERDATA_MAXLEN: ::c_int = 256;

0 commit comments

Comments
 (0)