Skip to content

Commit

Permalink
Bump NFT_*_MAXNAMELEN to 256
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Feb 25, 2018
1 parent fe49994 commit 95befb4
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/unix/notbsd/linux/other/mod.rs
Expand Up @@ -625,13 +625,22 @@ pub const NFPROTO_IPV6: ::c_int = 10;
pub const NFPROTO_DECNET: ::c_int = 12;
pub const NFPROTO_NUMPROTO: ::c_int = 13;

pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
cfg_if! {
if #[cfg(not(target_arch = "sparc64"))] {
cfg_if!{
if #[cfg(any(target_arch = "arm", target_arch = "powerpc",
target_arch = "powerpc64", target_arch = "aarch64"))] {
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
} else if #[cfg(target_arch = "sparc64")] {
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
} else {
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
}
}
pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
Expand Down

0 comments on commit 95befb4

Please sign in to comment.