Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Pkg Iptables
Commits
0309474b
Commit
0309474b
authored
Nov 15, 2018
by
Arturo Borrero Gonzalez
Browse files
New upstream version 1.8.2
parent
3bc9369c
Changes
41
Hide whitespace changes
Inline
Side-by-side
libxtables/xtables.c
View file @
0309474b
...
@@ -2077,6 +2077,28 @@ void xtables_print_num(uint64_t number, unsigned int format)
...
@@ -2077,6 +2077,28 @@ void xtables_print_num(uint64_t number, unsigned int format)
printf
(
FMT
(
"%4lluT "
,
"%lluT "
),
(
unsigned
long
long
)
number
);
printf
(
FMT
(
"%4lluT "
,
"%lluT "
),
(
unsigned
long
long
)
number
);
}
}
void
xtables_print_mac
(
const
unsigned
char
*
macaddress
)
{
unsigned
int
i
;
printf
(
"%02x"
,
macaddress
[
0
]);
for
(
i
=
1
;
i
<
6
;
++
i
)
printf
(
":%02x"
,
macaddress
[
i
]);
}
void
xtables_print_mac_and_mask
(
const
unsigned
char
*
mac
,
const
unsigned
char
*
mask
)
{
static
const
char
hlpmsk
[]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
};
xtables_print_mac
(
mac
);
if
(
memcmp
(
mask
,
hlpmsk
,
6
)
==
0
)
return
;
printf
(
"/"
);
xtables_print_mac
(
mask
);
}
void
xtables_parse_val_mask
(
struct
xt_option_call
*
cb
,
void
xtables_parse_val_mask
(
struct
xt_option_call
*
cb
,
unsigned
int
*
val
,
unsigned
int
*
mask
,
unsigned
int
*
val
,
unsigned
int
*
mask
,
const
struct
xtables_lmap
*
lmap
)
const
struct
xtables_lmap
*
lmap
)
...
@@ -2190,6 +2212,7 @@ struct xt_xlate *xt_xlate_alloc(int size)
...
@@ -2190,6 +2212,7 @@ struct xt_xlate *xt_xlate_alloc(int size)
if
(
xl
->
buf
.
data
==
NULL
)
if
(
xl
->
buf
.
data
==
NULL
)
xtables_error
(
RESOURCE_PROBLEM
,
"OOM"
);
xtables_error
(
RESOURCE_PROBLEM
,
"OOM"
);
xl
->
buf
.
data
[
0
]
=
'\0'
;
xl
->
buf
.
size
=
size
;
xl
->
buf
.
size
=
size
;
xl
->
buf
.
rem
=
size
;
xl
->
buf
.
rem
=
size
;
xl
->
buf
.
off
=
0
;
xl
->
buf
.
off
=
0
;
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment