diff options
author | Florian Westphal <fw@strlen.de> | 2013-08-13 10:48:50 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-08-13 18:07:08 +0200 |
commit | 7983983a2912165aaa3b9fff2f7aa42421d2f730 (patch) | |
tree | 461cf7fb68f02b3c518c8931e355a06eaaeed204 /src/extra/pktbuff.c | |
parent | c31e6c60cdd43e94d6bb73f95f688e6d062315df (diff) |
build: avoid symbol namespace pollution
As of f40eabb01 (add pkt_buff and protocol helper functions)
libnetfilter_queue accidentally exports the internal function named
'checksum'. This is a bit too generic and may cause crashes with
applications that worked fine before.
This patch makes the functions checksum, checksum_tcpudp_ipv4 and
checksum_tcpudp_ipv6 local by building with fvis-hidden and adding
EXPORTs for the legacy api calls and the ones that seem to have missing
EXPORT tags (mainly pktbuff api).
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/extra/pktbuff.c')
-rw-r--r-- | src/extra/pktbuff.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c index 0bd778d..1c15a00 100644 --- a/src/extra/pktbuff.c +++ b/src/extra/pktbuff.c @@ -84,6 +84,7 @@ pktb_alloc(int family, void *data, size_t len, size_t extra) } return pktb; } +EXPORT_SYMBOL(pktb_alloc); /** * pktb_data - return pointer to the beginning of the packet buffer @@ -93,6 +94,7 @@ uint8_t *pktb_data(struct pkt_buff *pktb) { return pktb->data; } +EXPORT_SYMBOL(pktb_data); /** * pktb_len - return length of the packet buffer @@ -102,6 +104,7 @@ uint32_t pktb_len(struct pkt_buff *pktb) { return pktb->len; } +EXPORT_SYMBOL(pktb_len); /** * pktb_free - release packet buffer @@ -111,6 +114,7 @@ void pktb_free(struct pkt_buff *pktb) { free(pktb); } +EXPORT_SYMBOL(pktb_free); /** * pktb_push - update pointer to the beginning of the packet buffer @@ -121,6 +125,7 @@ void pktb_push(struct pkt_buff *pktb, unsigned int len) pktb->data -= len; pktb->len += len; } +EXPORT_SYMBOL(pktb_push); /** * pktb_pull - update pointer to the beginning of the packet buffer @@ -131,6 +136,7 @@ void pktb_pull(struct pkt_buff *pktb, unsigned int len) pktb->data += len; pktb->len -= len; } +EXPORT_SYMBOL(pktb_pull); /** * pktb_put - add extra bytes to the tail of the packet buffer @@ -141,6 +147,7 @@ void pktb_put(struct pkt_buff *pktb, unsigned int len) pktb->tail += len; pktb->len += len; } +EXPORT_SYMBOL(pktb_put); /** * pktb_trim - set new length for this packet buffer @@ -150,6 +157,7 @@ void pktb_trim(struct pkt_buff *pktb, unsigned int len) { pktb->len = len; } +EXPORT_SYMBOL(pktb_trim); /** * pktb_tailroom - get room in bytes in the tail of the packet buffer @@ -159,6 +167,7 @@ unsigned int pktb_tailroom(struct pkt_buff *pktb) { return pktb->data_len - pktb->len; } +EXPORT_SYMBOL(pktb_tailroom); /** * pktb_mac_header - return pointer to layer 2 header (if any) @@ -168,6 +177,7 @@ uint8_t *pktb_mac_header(struct pkt_buff *pktb) { return pktb->mac_header; } +EXPORT_SYMBOL(pktb_mac_header); /** * pktb_network_header - return pointer to layer 3 header @@ -177,6 +187,7 @@ uint8_t *pktb_network_header(struct pkt_buff *pktb) { return pktb->network_header; } +EXPORT_SYMBOL(pktb_network_header); /** * pktb_transport_header - return pointer to layer 4 header (if any) @@ -186,6 +197,7 @@ uint8_t *pktb_transport_header(struct pkt_buff *pktb) { return pktb->transport_header; } +EXPORT_SYMBOL(pktb_transport_header); static int pktb_expand_tail(struct pkt_buff *pkt, int extra) { |