diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2022-01-14 09:39:38 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-01-18 09:01:51 -0800 |
| commit | ec5cc94217f33c0e676d48cd9352bc9e3b8ddd5b (patch) | |
| tree | 750120d7066372a7153b9dcf88ef616bbce05520 | |
| parent | 171f4299686f7670a7f65eef30eb7625bd9d800f (diff) | |
| download | meta-openembedded-ec5cc94217f33c0e676d48cd9352bc9e3b8ddd5b.tar.gz | |
libnetfilter-queue: upgrade 1.0.3 -> 1.0.5
Drop 0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch
as the clang build issue had been fixed upstream.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch | 1227 | ||||
| -rw-r--r-- | meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.5.bb (renamed from meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb) | 3 |
2 files changed, 1 insertions, 1229 deletions
diff --git a/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch b/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch deleted file mode 100644 index aa9ff09a99..0000000000 --- a/meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch +++ /dev/null | |||
| @@ -1,1227 +0,0 @@ | |||
| 1 | From db7eb5f0a4e78c6bd3c4f9cbd8332d909eb82ad6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 10 Apr 2017 12:09:41 -0700 | ||
| 4 | Subject: [PATCH] Declare the define visivility attribute together | ||
| 5 | |||
| 6 | clang ignores the visibility attribute if its not | ||
| 7 | defined before the definition. As a result these | ||
| 8 | symbols become hidden and consumers of this library | ||
| 9 | fail to link due to these missing symbols | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | |||
| 13 | --- | ||
| 14 | doxygen.cfg.in | 2 +- | ||
| 15 | src/extra/ipv4.c | 15 ++---- | ||
| 16 | src/extra/ipv6.c | 9 ++-- | ||
| 17 | src/extra/pktbuff.c | 42 +++++---------- | ||
| 18 | src/extra/tcp.c | 21 +++----- | ||
| 19 | src/extra/udp.c | 21 +++----- | ||
| 20 | src/internal.h | 5 +- | ||
| 21 | src/libnetfilter_queue.c | 108 +++++++++++++-------------------------- | ||
| 22 | src/nlmsg.c | 21 +++----- | ||
| 23 | 9 files changed, 82 insertions(+), 162 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/doxygen.cfg.in b/doxygen.cfg.in | ||
| 26 | index a7378ca..659abee 100644 | ||
| 27 | --- a/doxygen.cfg.in | ||
| 28 | +++ b/doxygen.cfg.in | ||
| 29 | @@ -72,7 +72,7 @@ RECURSIVE = YES | ||
| 30 | EXCLUDE = | ||
| 31 | EXCLUDE_SYMLINKS = NO | ||
| 32 | EXCLUDE_PATTERNS = | ||
| 33 | -EXCLUDE_SYMBOLS = EXPORT_SYMBOL | ||
| 34 | +EXCLUDE_SYMBOLS = | ||
| 35 | EXAMPLE_PATH = | ||
| 36 | EXAMPLE_PATTERNS = | ||
| 37 | EXAMPLE_RECURSIVE = NO | ||
| 38 | diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c | ||
| 39 | index a93d113..56d5dc7 100644 | ||
| 40 | --- a/src/extra/ipv4.c | ||
| 41 | +++ b/src/extra/ipv4.c | ||
| 42 | @@ -32,7 +32,7 @@ | ||
| 43 | * This funcion returns NULL if the IPv4 is malformed or the protocol version | ||
| 44 | * is not 4. On success, it returns a valid pointer to the IPv4 header. | ||
| 45 | */ | ||
| 46 | -struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb) | ||
| 47 | +struct iphdr __EXPORTED *nfq_ip_get_hdr(struct pkt_buff *pktb) | ||
| 48 | { | ||
| 49 | struct iphdr *iph; | ||
| 50 | unsigned int pktlen = pktb->tail - pktb->network_header; | ||
| 51 | @@ -53,14 +53,13 @@ struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb) | ||
| 52 | |||
| 53 | return iph; | ||
| 54 | } | ||
| 55 | -EXPORT_SYMBOL(nfq_ip_get_hdr); | ||
| 56 | |||
| 57 | /** | ||
| 58 | * nfq_ip_set_transport_header - set transport header | ||
| 59 | * \param pktb: pointer to network packet buffer | ||
| 60 | * \param iph: pointer to the IPv4 header | ||
| 61 | */ | ||
| 62 | -int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) | ||
| 63 | +int __EXPORTED nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) | ||
| 64 | { | ||
| 65 | int doff = iph->ihl * 4; | ||
| 66 | |||
| 67 | @@ -71,7 +70,6 @@ int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) | ||
| 68 | pktb->transport_header = pktb->network_header + doff; | ||
| 69 | return 0; | ||
| 70 | } | ||
| 71 | -EXPORT_SYMBOL(nfq_ip_set_transport_header); | ||
| 72 | |||
| 73 | /** | ||
| 74 | * nfq_ip_set_checksum - set IPv4 checksum | ||
| 75 | @@ -80,14 +78,13 @@ EXPORT_SYMBOL(nfq_ip_set_transport_header); | ||
| 76 | * \note Call to this function if you modified the IPv4 header to update the | ||
| 77 | * checksum. | ||
| 78 | */ | ||
| 79 | -void nfq_ip_set_checksum(struct iphdr *iph) | ||
| 80 | +void __EXPORTED nfq_ip_set_checksum(struct iphdr *iph) | ||
| 81 | { | ||
| 82 | uint32_t iph_len = iph->ihl * 4; | ||
| 83 | |||
| 84 | iph->check = 0; | ||
| 85 | iph->check = nfq_checksum(0, (uint16_t *)iph, iph_len); | ||
| 86 | } | ||
| 87 | -EXPORT_SYMBOL(nfq_ip_set_checksum); | ||
| 88 | |||
| 89 | /** | ||
| 90 | * nfq_ip_mangle - mangle IPv4 packet buffer | ||
| 91 | @@ -100,7 +97,7 @@ EXPORT_SYMBOL(nfq_ip_set_checksum); | ||
| 92 | * | ||
| 93 | * \note This function recalculates the IPv4 checksum (if needed). | ||
| 94 | */ | ||
| 95 | -int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, | ||
| 96 | +int __EXPORTED nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, | ||
| 97 | unsigned int match_offset, unsigned int match_len, | ||
| 98 | const char *rep_buffer, unsigned int rep_len) | ||
| 99 | { | ||
| 100 | @@ -116,7 +113,6 @@ int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, | ||
| 101 | |||
| 102 | return 1; | ||
| 103 | } | ||
| 104 | -EXPORT_SYMBOL(nfq_ip_mangle); | ||
| 105 | |||
| 106 | /** | ||
| 107 | * nfq_pkt_snprintf_ip - print IPv4 header into buffer in iptables LOG format | ||
| 108 | @@ -128,7 +124,7 @@ EXPORT_SYMBOL(nfq_ip_mangle); | ||
| 109 | * case that there is enough room in the buffer. Read snprintf manpage for more | ||
| 110 | * information to know more about this strange behaviour. | ||
| 111 | */ | ||
| 112 | -int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) | ||
| 113 | +int __EXPORTED nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) | ||
| 114 | { | ||
| 115 | int ret; | ||
| 116 | struct in_addr src = { iph->saddr }; | ||
| 117 | @@ -147,7 +143,6 @@ int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) | ||
| 118 | |||
| 119 | return ret; | ||
| 120 | } | ||
| 121 | -EXPORT_SYMBOL(nfq_ip_snprintf); | ||
| 122 | |||
| 123 | /** | ||
| 124 | * @} | ||
| 125 | diff --git a/src/extra/ipv6.c b/src/extra/ipv6.c | ||
| 126 | index 7c5dc9b..6641c6b 100644 | ||
| 127 | --- a/src/extra/ipv6.c | ||
| 128 | +++ b/src/extra/ipv6.c | ||
| 129 | @@ -33,7 +33,7 @@ | ||
| 130 | * This funcion returns NULL if an invalid header is found. On sucess, it | ||
| 131 | * returns a valid pointer to the header. | ||
| 132 | */ | ||
| 133 | -struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb) | ||
| 134 | +struct ip6_hdr __EXPORTED *nfq_ip6_get_hdr(struct pkt_buff *pktb) | ||
| 135 | { | ||
| 136 | struct ip6_hdr *ip6h; | ||
| 137 | unsigned int pktlen = pktb->tail - pktb->network_header; | ||
| 138 | @@ -50,7 +50,6 @@ struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb) | ||
| 139 | |||
| 140 | return ip6h; | ||
| 141 | } | ||
| 142 | -EXPORT_SYMBOL(nfq_ip6_get_hdr); | ||
| 143 | |||
| 144 | /** | ||
| 145 | * nfq_ip6_set_transport_header - set transport header pointer for IPv6 packet | ||
| 146 | @@ -61,7 +60,7 @@ EXPORT_SYMBOL(nfq_ip6_get_hdr); | ||
| 147 | * This function returns 1 if the protocol has been found and the transport | ||
| 148 | * header has been set. Otherwise, it returns 0. | ||
| 149 | */ | ||
| 150 | -int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, | ||
| 151 | +int __EXPORTED nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, | ||
| 152 | uint8_t target) | ||
| 153 | { | ||
| 154 | uint8_t nexthdr = ip6h->ip6_nxt; | ||
| 155 | @@ -115,7 +114,6 @@ int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, | ||
| 156 | pktb->transport_header = cur; | ||
| 157 | return cur ? 1 : 0; | ||
| 158 | } | ||
| 159 | -EXPORT_SYMBOL(nfq_ip6_set_transport_header); | ||
| 160 | |||
| 161 | /** | ||
| 162 | * nfq_ip6_snprintf - print IPv6 header into one buffer in iptables LOG format | ||
| 163 | @@ -124,7 +122,7 @@ EXPORT_SYMBOL(nfq_ip6_set_transport_header); | ||
| 164 | * \param ip6_hdr: pointer to a valid IPv6 header. | ||
| 165 | * | ||
| 166 | */ | ||
| 167 | -int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) | ||
| 168 | +int __EXPORTED nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) | ||
| 169 | { | ||
| 170 | int ret; | ||
| 171 | char src[INET6_ADDRSTRLEN]; | ||
| 172 | @@ -143,7 +141,6 @@ int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) | ||
| 173 | |||
| 174 | return ret; | ||
| 175 | } | ||
| 176 | -EXPORT_SYMBOL(nfq_ip6_snprintf); | ||
| 177 | |||
| 178 | /** | ||
| 179 | * @} | ||
| 180 | diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c | ||
| 181 | index 1c15a00..54d8244 100644 | ||
| 182 | --- a/src/extra/pktbuff.c | ||
| 183 | +++ b/src/extra/pktbuff.c | ||
| 184 | @@ -40,7 +40,7 @@ | ||
| 185 | * | ||
| 186 | * \return a pointer to a new queue handle or NULL on failure. | ||
| 187 | */ | ||
| 188 | -struct pkt_buff * | ||
| 189 | +struct pkt_buff __EXPORTED * | ||
| 190 | pktb_alloc(int family, void *data, size_t len, size_t extra) | ||
| 191 | { | ||
| 192 | struct pkt_buff *pktb; | ||
| 193 | @@ -84,120 +84,108 @@ pktb_alloc(int family, void *data, size_t len, size_t extra) | ||
| 194 | } | ||
| 195 | return pktb; | ||
| 196 | } | ||
| 197 | -EXPORT_SYMBOL(pktb_alloc); | ||
| 198 | |||
| 199 | /** | ||
| 200 | * pktb_data - return pointer to the beginning of the packet buffer | ||
| 201 | * \param pktb Pointer to packet buffer | ||
| 202 | */ | ||
| 203 | -uint8_t *pktb_data(struct pkt_buff *pktb) | ||
| 204 | +uint8_t __EXPORTED *pktb_data(struct pkt_buff *pktb) | ||
| 205 | { | ||
| 206 | return pktb->data; | ||
| 207 | } | ||
| 208 | -EXPORT_SYMBOL(pktb_data); | ||
| 209 | |||
| 210 | /** | ||
| 211 | * pktb_len - return length of the packet buffer | ||
| 212 | * \param pktb Pointer to packet buffer | ||
| 213 | */ | ||
| 214 | -uint32_t pktb_len(struct pkt_buff *pktb) | ||
| 215 | +uint32_t __EXPORTED pktb_len(struct pkt_buff *pktb) | ||
| 216 | { | ||
| 217 | return pktb->len; | ||
| 218 | } | ||
| 219 | -EXPORT_SYMBOL(pktb_len); | ||
| 220 | |||
| 221 | /** | ||
| 222 | * pktb_free - release packet buffer | ||
| 223 | * \param pktb Pointer to packet buffer | ||
| 224 | */ | ||
| 225 | -void pktb_free(struct pkt_buff *pktb) | ||
| 226 | +void __EXPORTED pktb_free(struct pkt_buff *pktb) | ||
| 227 | { | ||
| 228 | free(pktb); | ||
| 229 | } | ||
| 230 | -EXPORT_SYMBOL(pktb_free); | ||
| 231 | |||
| 232 | /** | ||
| 233 | * pktb_push - update pointer to the beginning of the packet buffer | ||
| 234 | * \param pktb Pointer to packet buffer | ||
| 235 | */ | ||
| 236 | -void pktb_push(struct pkt_buff *pktb, unsigned int len) | ||
| 237 | +void __EXPORTED pktb_push(struct pkt_buff *pktb, unsigned int len) | ||
| 238 | { | ||
| 239 | pktb->data -= len; | ||
| 240 | pktb->len += len; | ||
| 241 | } | ||
| 242 | -EXPORT_SYMBOL(pktb_push); | ||
| 243 | |||
| 244 | /** | ||
| 245 | * pktb_pull - update pointer to the beginning of the packet buffer | ||
| 246 | * \param pktb Pointer to packet buffer | ||
| 247 | */ | ||
| 248 | -void pktb_pull(struct pkt_buff *pktb, unsigned int len) | ||
| 249 | +void __EXPORTED pktb_pull(struct pkt_buff *pktb, unsigned int len) | ||
| 250 | { | ||
| 251 | pktb->data += len; | ||
| 252 | pktb->len -= len; | ||
| 253 | } | ||
| 254 | -EXPORT_SYMBOL(pktb_pull); | ||
| 255 | |||
| 256 | /** | ||
| 257 | * pktb_put - add extra bytes to the tail of the packet buffer | ||
| 258 | * \param pktb Pointer to packet buffer | ||
| 259 | */ | ||
| 260 | -void pktb_put(struct pkt_buff *pktb, unsigned int len) | ||
| 261 | +void __EXPORTED pktb_put(struct pkt_buff *pktb, unsigned int len) | ||
| 262 | { | ||
| 263 | pktb->tail += len; | ||
| 264 | pktb->len += len; | ||
| 265 | } | ||
| 266 | -EXPORT_SYMBOL(pktb_put); | ||
| 267 | |||
| 268 | /** | ||
| 269 | * pktb_trim - set new length for this packet buffer | ||
| 270 | * \param pktb Pointer to packet buffer | ||
| 271 | */ | ||
| 272 | -void pktb_trim(struct pkt_buff *pktb, unsigned int len) | ||
| 273 | +void __EXPORTED pktb_trim(struct pkt_buff *pktb, unsigned int len) | ||
| 274 | { | ||
| 275 | pktb->len = len; | ||
| 276 | } | ||
| 277 | -EXPORT_SYMBOL(pktb_trim); | ||
| 278 | |||
| 279 | /** | ||
| 280 | * pktb_tailroom - get room in bytes in the tail of the packet buffer | ||
| 281 | * \param pktb Pointer to packet buffer | ||
| 282 | */ | ||
| 283 | -unsigned int pktb_tailroom(struct pkt_buff *pktb) | ||
| 284 | +unsigned int __EXPORTED pktb_tailroom(struct pkt_buff *pktb) | ||
| 285 | { | ||
| 286 | return pktb->data_len - pktb->len; | ||
| 287 | } | ||
| 288 | -EXPORT_SYMBOL(pktb_tailroom); | ||
| 289 | |||
| 290 | /** | ||
| 291 | * pktb_mac_header - return pointer to layer 2 header (if any) | ||
| 292 | * \param pktb Pointer to packet buffer | ||
| 293 | */ | ||
| 294 | -uint8_t *pktb_mac_header(struct pkt_buff *pktb) | ||
| 295 | +uint8_t __EXPORTED *pktb_mac_header(struct pkt_buff *pktb) | ||
| 296 | { | ||
| 297 | return pktb->mac_header; | ||
| 298 | } | ||
| 299 | -EXPORT_SYMBOL(pktb_mac_header); | ||
| 300 | |||
| 301 | /** | ||
| 302 | * pktb_network_header - return pointer to layer 3 header | ||
| 303 | * \param pktb Pointer to packet buffer | ||
| 304 | */ | ||
| 305 | -uint8_t *pktb_network_header(struct pkt_buff *pktb) | ||
| 306 | +uint8_t __EXPORTED *pktb_network_header(struct pkt_buff *pktb) | ||
| 307 | { | ||
| 308 | return pktb->network_header; | ||
| 309 | } | ||
| 310 | -EXPORT_SYMBOL(pktb_network_header); | ||
| 311 | |||
| 312 | /** | ||
| 313 | * pktb_transport_header - return pointer to layer 4 header (if any) | ||
| 314 | * \param pktb Pointer to packet buffer | ||
| 315 | */ | ||
| 316 | -uint8_t *pktb_transport_header(struct pkt_buff *pktb) | ||
| 317 | +uint8_t __EXPORTED *pktb_transport_header(struct pkt_buff *pktb) | ||
| 318 | { | ||
| 319 | return pktb->transport_header; | ||
| 320 | } | ||
| 321 | -EXPORT_SYMBOL(pktb_transport_header); | ||
| 322 | |||
| 323 | static int pktb_expand_tail(struct pkt_buff *pkt, int extra) | ||
| 324 | { | ||
| 325 | @@ -224,7 +212,7 @@ static int enlarge_pkt(struct pkt_buff *pkt, unsigned int extra) | ||
| 326 | return 1; | ||
| 327 | } | ||
| 328 | |||
| 329 | -int pktb_mangle(struct pkt_buff *pkt, | ||
| 330 | +int __EXPORTED pktb_mangle(struct pkt_buff *pkt, | ||
| 331 | unsigned int dataoff, | ||
| 332 | unsigned int match_offset, | ||
| 333 | unsigned int match_len, | ||
| 334 | @@ -258,17 +246,15 @@ int pktb_mangle(struct pkt_buff *pkt, | ||
| 335 | pkt->mangled = true; | ||
| 336 | return 1; | ||
| 337 | } | ||
| 338 | -EXPORT_SYMBOL(pktb_mangle); | ||
| 339 | |||
| 340 | /** | ||
| 341 | * pktb_mangled - return true if packet has been mangled | ||
| 342 | * \param pktb Pointer to packet buffer | ||
| 343 | */ | ||
| 344 | -bool pktb_mangled(const struct pkt_buff *pkt) | ||
| 345 | +bool __EXPORTED pktb_mangled(const struct pkt_buff *pkt) | ||
| 346 | { | ||
| 347 | return pkt->mangled; | ||
| 348 | } | ||
| 349 | -EXPORT_SYMBOL(pktb_mangled); | ||
| 350 | |||
| 351 | /** | ||
| 352 | * @} | ||
| 353 | diff --git a/src/extra/tcp.c b/src/extra/tcp.c | ||
| 354 | index d1cd79d..8038ce5 100644 | ||
| 355 | --- a/src/extra/tcp.c | ||
| 356 | +++ b/src/extra/tcp.c | ||
| 357 | @@ -40,7 +40,7 @@ | ||
| 358 | * \note You have to call nfq_ip_set_transport_header or | ||
| 359 | * nfq_ip6_set_transport_header first to access the TCP header. | ||
| 360 | */ | ||
| 361 | -struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb) | ||
| 362 | +struct tcphdr __EXPORTED *nfq_tcp_get_hdr(struct pkt_buff *pktb) | ||
| 363 | { | ||
| 364 | if (pktb->transport_header == NULL) | ||
| 365 | return NULL; | ||
| 366 | @@ -51,14 +51,13 @@ struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb) | ||
| 367 | |||
| 368 | return (struct tcphdr *)pktb->transport_header; | ||
| 369 | } | ||
| 370 | -EXPORT_SYMBOL(nfq_tcp_get_hdr); | ||
| 371 | |||
| 372 | /** | ||
| 373 | * nfq_tcp_get_payload - get the TCP packet payload | ||
| 374 | * \param tcph: pointer to the TCP header | ||
| 375 | * \param pktb: pointer to user-space network packet buffer | ||
| 376 | */ | ||
| 377 | -void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) | ||
| 378 | +void __EXPORTED *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) | ||
| 379 | { | ||
| 380 | unsigned int len = tcph->doff * 4; | ||
| 381 | |||
| 382 | @@ -72,47 +71,43 @@ void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) | ||
| 383 | |||
| 384 | return pktb->transport_header + len; | ||
| 385 | } | ||
| 386 | -EXPORT_SYMBOL(nfq_tcp_get_payload); | ||
| 387 | |||
| 388 | /** | ||
| 389 | * nfq_tcp_get_payload_len - get the tcp packet payload | ||
| 390 | * \param tcph: pointer to the TCP header | ||
| 391 | * \param pktb: pointer to user-space network packet buffer | ||
| 392 | */ | ||
| 393 | -unsigned int | ||
| 394 | +unsigned int __EXPORTED | ||
| 395 | nfq_tcp_get_payload_len(struct tcphdr *tcph, struct pkt_buff *pktb) | ||
| 396 | { | ||
| 397 | return pktb->tail - pktb->transport_header; | ||
| 398 | } | ||
| 399 | -EXPORT_SYMBOL(nfq_tcp_get_payload_len); | ||
| 400 | |||
| 401 | /** | ||
| 402 | * nfq_tcp_set_checksum_ipv4 - computes IPv4/TCP packet checksum | ||
| 403 | * \param tcph: pointer to the TCP header | ||
| 404 | * \param iph: pointer to the IPv4 header | ||
| 405 | */ | ||
| 406 | -void | ||
| 407 | +void __EXPORTED | ||
| 408 | nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph) | ||
| 409 | { | ||
| 410 | /* checksum field in header needs to be zero for calculation. */ | ||
| 411 | tcph->check = 0; | ||
| 412 | tcph->check = nfq_checksum_tcpudp_ipv4(iph); | ||
| 413 | } | ||
| 414 | -EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4); | ||
| 415 | |||
| 416 | /** | ||
| 417 | * nfq_tcp_set_checksum_ipv6 - computes IPv6/TCP packet checksum | ||
| 418 | * \param tcph: pointer to the TCP header | ||
| 419 | * \param iph: pointer to the IPv6 header | ||
| 420 | */ | ||
| 421 | -void | ||
| 422 | +void __EXPORTED | ||
| 423 | nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h) | ||
| 424 | { | ||
| 425 | /* checksum field in header needs to be zero for calculation. */ | ||
| 426 | tcph->check = 0; | ||
| 427 | tcph->check = nfq_checksum_tcpudp_ipv6(ip6h, tcph); | ||
| 428 | } | ||
| 429 | -EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv6); | ||
| 430 | |||
| 431 | /* | ||
| 432 | * The union cast uses a gcc extension to avoid aliasing problems | ||
| 433 | @@ -134,7 +129,7 @@ union tcp_word_hdr { | ||
| 434 | * \param tcp: pointer to a valid tcp header. | ||
| 435 | * | ||
| 436 | */ | ||
| 437 | -int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) | ||
| 438 | +int __EXPORTED nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) | ||
| 439 | { | ||
| 440 | int ret, len = 0; | ||
| 441 | |||
| 442 | @@ -177,7 +172,6 @@ int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) | ||
| 443 | |||
| 444 | return ret; | ||
| 445 | } | ||
| 446 | -EXPORT_SYMBOL(nfq_tcp_snprintf); | ||
| 447 | |||
| 448 | /** | ||
| 449 | * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer | ||
| 450 | @@ -189,7 +183,7 @@ EXPORT_SYMBOL(nfq_tcp_snprintf); | ||
| 451 | * | ||
| 452 | * \note This function recalculates the IPv4 and TCP checksums for you. | ||
| 453 | */ | ||
| 454 | -int | ||
| 455 | +int __EXPORTED | ||
| 456 | nfq_tcp_mangle_ipv4(struct pkt_buff *pkt, | ||
| 457 | unsigned int match_offset, unsigned int match_len, | ||
| 458 | const char *rep_buffer, unsigned int rep_len) | ||
| 459 | @@ -208,7 +202,6 @@ nfq_tcp_mangle_ipv4(struct pkt_buff *pkt, | ||
| 460 | |||
| 461 | return 1; | ||
| 462 | } | ||
| 463 | -EXPORT_SYMBOL(nfq_tcp_mangle_ipv4); | ||
| 464 | |||
| 465 | /** | ||
| 466 | * @} | ||
| 467 | diff --git a/src/extra/udp.c b/src/extra/udp.c | ||
| 468 | index 8c44a66..99c8faa 100644 | ||
| 469 | --- a/src/extra/udp.c | ||
| 470 | +++ b/src/extra/udp.c | ||
| 471 | @@ -37,7 +37,7 @@ | ||
| 472 | * This function returns NULL if invalid UDP header is found. On success, | ||
| 473 | * it returns the UDP header. | ||
| 474 | */ | ||
| 475 | -struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb) | ||
| 476 | +struct udphdr __EXPORTED *nfq_udp_get_hdr(struct pkt_buff *pktb) | ||
| 477 | { | ||
| 478 | if (pktb->transport_header == NULL) | ||
| 479 | return NULL; | ||
| 480 | @@ -48,14 +48,13 @@ struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb) | ||
| 481 | |||
| 482 | return (struct udphdr *)pktb->transport_header; | ||
| 483 | } | ||
| 484 | -EXPORT_SYMBOL(nfq_udp_get_hdr); | ||
| 485 | |||
| 486 | /** | ||
| 487 | * nfq_udp_get_payload - get the UDP packet payload. | ||
| 488 | * \param udph: the pointer to the UDP header. | ||
| 489 | * \param tail: pointer to the tail of the packet | ||
| 490 | */ | ||
| 491 | -void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) | ||
| 492 | +void __EXPORTED *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) | ||
| 493 | { | ||
| 494 | uint16_t len = ntohs(udph->len); | ||
| 495 | |||
| 496 | @@ -69,17 +68,15 @@ void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) | ||
| 497 | |||
| 498 | return pktb->transport_header + sizeof(struct udphdr); | ||
| 499 | } | ||
| 500 | -EXPORT_SYMBOL(nfq_udp_get_payload); | ||
| 501 | |||
| 502 | /** | ||
| 503 | * nfq_udp_get_payload_len - get the udp packet payload. | ||
| 504 | * \param udp: the pointer to the udp header. | ||
| 505 | */ | ||
| 506 | -unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb) | ||
| 507 | +unsigned int __EXPORTED nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb) | ||
| 508 | { | ||
| 509 | return pktb->tail - pktb->transport_header; | ||
| 510 | } | ||
| 511 | -EXPORT_SYMBOL(nfq_udp_get_payload_len); | ||
| 512 | |||
| 513 | /** | ||
| 514 | * nfq_udp_set_checksum_ipv4 - computes a IPv4/TCP packet's segment | ||
| 515 | @@ -91,14 +88,13 @@ EXPORT_SYMBOL(nfq_udp_get_payload_len); | ||
| 516 | * \see nfq_pkt_compute_ip_checksum | ||
| 517 | * \see nfq_pkt_compute_udp_checksum | ||
| 518 | */ | ||
| 519 | -void | ||
| 520 | +void __EXPORTED | ||
| 521 | nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph) | ||
| 522 | { | ||
| 523 | /* checksum field in header needs to be zero for calculation. */ | ||
| 524 | udph->check = 0; | ||
| 525 | udph->check = nfq_checksum_tcpudp_ipv4(iph); | ||
| 526 | } | ||
| 527 | -EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); | ||
| 528 | |||
| 529 | /** | ||
| 530 | * nfq_udp_set_checksum_ipv6 - computes a IPv6/TCP packet's segment | ||
| 531 | @@ -110,14 +106,13 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); | ||
| 532 | * \see nfq_pkt_compute_ip_checksum | ||
| 533 | * \see nfq_pkt_compute_udp_checksum | ||
| 534 | */ | ||
| 535 | -void | ||
| 536 | +void __EXPORTED | ||
| 537 | nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h) | ||
| 538 | { | ||
| 539 | /* checksum field in header needs to be zero for calculation. */ | ||
| 540 | udph->check = 0; | ||
| 541 | udph->check = nfq_checksum_tcpudp_ipv6(ip6h, udph); | ||
| 542 | } | ||
| 543 | -EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6); | ||
| 544 | |||
| 545 | /** | ||
| 546 | * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer | ||
| 547 | @@ -129,7 +124,7 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6); | ||
| 548 | * | ||
| 549 | * \note This function recalculates the IPv4 and TCP checksums for you. | ||
| 550 | */ | ||
| 551 | -int | ||
| 552 | +int __EXPORTED | ||
| 553 | nfq_udp_mangle_ipv4(struct pkt_buff *pkt, | ||
| 554 | unsigned int match_offset, unsigned int match_len, | ||
| 555 | const char *rep_buffer, unsigned int rep_len) | ||
| 556 | @@ -148,7 +143,6 @@ nfq_udp_mangle_ipv4(struct pkt_buff *pkt, | ||
| 557 | |||
| 558 | return 1; | ||
| 559 | } | ||
| 560 | -EXPORT_SYMBOL(nfq_udp_mangle_ipv4); | ||
| 561 | |||
| 562 | /** | ||
| 563 | * nfq_pkt_snprintf_udp_hdr - print udp header into one buffer in a humnan | ||
| 564 | @@ -158,12 +152,11 @@ EXPORT_SYMBOL(nfq_udp_mangle_ipv4); | ||
| 565 | * \param udp: pointer to a valid udp header. | ||
| 566 | * | ||
| 567 | */ | ||
| 568 | -int nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph) | ||
| 569 | +int __EXPORTED nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph) | ||
| 570 | { | ||
| 571 | return snprintf(buf, size, "SPT=%u DPT=%u ", | ||
| 572 | htons(udph->source), htons(udph->dest)); | ||
| 573 | } | ||
| 574 | -EXPORT_SYMBOL(nfq_udp_snprintf); | ||
| 575 | |||
| 576 | /** | ||
| 577 | * @} | ||
| 578 | diff --git a/src/internal.h b/src/internal.h | ||
| 579 | index 558d267..79b0752 100644 | ||
| 580 | --- a/src/internal.h | ||
| 581 | +++ b/src/internal.h | ||
| 582 | @@ -5,10 +5,9 @@ | ||
| 583 | #include <stdint.h> | ||
| 584 | #include <stdbool.h> | ||
| 585 | #ifdef HAVE_VISIBILITY_HIDDEN | ||
| 586 | -# define __visible __attribute__((visibility("default"))) | ||
| 587 | -# define EXPORT_SYMBOL(x) typeof(x) (x) __visible | ||
| 588 | +# define __EXPORTED __attribute__((visibility("default"))) | ||
| 589 | #else | ||
| 590 | -# define EXPORT_SYMBOL | ||
| 591 | +# define __EXPORTED | ||
| 592 | #endif | ||
| 593 | |||
| 594 | struct iphdr; | ||
| 595 | diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c | ||
| 596 | index 673e3b0..c12f068 100644 | ||
| 597 | --- a/src/libnetfilter_queue.c | ||
| 598 | +++ b/src/libnetfilter_queue.c | ||
| 599 | @@ -133,8 +133,7 @@ struct nfq_data { | ||
| 600 | struct nfattr **data; | ||
| 601 | }; | ||
| 602 | |||
| 603 | -int nfq_errno; | ||
| 604 | -EXPORT_SYMBOL(nfq_errno); | ||
| 605 | +int __EXPORTED nfq_errno; | ||
| 606 | |||
| 607 | /*********************************************************************** | ||
| 608 | * low level stuff | ||
| 609 | @@ -218,11 +217,10 @@ static int __nfq_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[], | ||
| 610 | |||
| 611 | /* public interface */ | ||
| 612 | |||
| 613 | -struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h) | ||
| 614 | +struct nfnl_handle __EXPORTED *nfq_nfnlh(struct nfq_handle *h) | ||
| 615 | { | ||
| 616 | return h->nfnlh; | ||
| 617 | } | ||
| 618 | -EXPORT_SYMBOL(nfq_nfnlh); | ||
| 619 | |||
| 620 | /** | ||
| 621 | * | ||
| 622 | @@ -294,11 +292,10 @@ EXPORT_SYMBOL(nfq_nfnlh); | ||
| 623 | * over the netlink connection associated with the given queue connection | ||
| 624 | * handle. | ||
| 625 | */ | ||
| 626 | -int nfq_fd(struct nfq_handle *h) | ||
| 627 | +int __EXPORTED nfq_fd(struct nfq_handle *h) | ||
| 628 | { | ||
| 629 | return nfnl_fd(nfq_nfnlh(h)); | ||
| 630 | } | ||
| 631 | -EXPORT_SYMBOL(nfq_fd); | ||
| 632 | /** | ||
| 633 | * @} | ||
| 634 | */ | ||
| 635 | @@ -349,7 +346,7 @@ EXPORT_SYMBOL(nfq_fd); | ||
| 636 | * | ||
| 637 | * \return a pointer to a new queue handle or NULL on failure. | ||
| 638 | */ | ||
| 639 | -struct nfq_handle *nfq_open(void) | ||
| 640 | +struct nfq_handle __EXPORTED *nfq_open(void) | ||
| 641 | { | ||
| 642 | struct nfnl_handle *nfnlh = nfnl_open(); | ||
| 643 | struct nfq_handle *qh; | ||
| 644 | @@ -366,7 +363,6 @@ struct nfq_handle *nfq_open(void) | ||
| 645 | |||
| 646 | return qh; | ||
| 647 | } | ||
| 648 | -EXPORT_SYMBOL(nfq_open); | ||
| 649 | |||
| 650 | /** | ||
| 651 | * @} | ||
| 652 | @@ -382,7 +378,7 @@ EXPORT_SYMBOL(nfq_open); | ||
| 653 | * | ||
| 654 | * \return a pointer to a new queue handle or NULL on failure. | ||
| 655 | */ | ||
| 656 | -struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh) | ||
| 657 | +struct nfq_handle __EXPORTED *nfq_open_nfnl(struct nfnl_handle *nfnlh) | ||
| 658 | { | ||
| 659 | struct nfnl_callback pkt_cb = { | ||
| 660 | .call = __nfq_rcv_pkt, | ||
| 661 | @@ -419,7 +415,6 @@ out_free: | ||
| 662 | free(h); | ||
| 663 | return NULL; | ||
| 664 | } | ||
| 665 | -EXPORT_SYMBOL(nfq_open_nfnl); | ||
| 666 | |||
| 667 | /** | ||
| 668 | * \addtogroup LibrarySetup | ||
| 669 | @@ -438,7 +433,7 @@ EXPORT_SYMBOL(nfq_open_nfnl); | ||
| 670 | * | ||
| 671 | * \return 0 on success, non-zero on failure. | ||
| 672 | */ | ||
| 673 | -int nfq_close(struct nfq_handle *h) | ||
| 674 | +int __EXPORTED nfq_close(struct nfq_handle *h) | ||
| 675 | { | ||
| 676 | int ret; | ||
| 677 | |||
| 678 | @@ -447,7 +442,6 @@ int nfq_close(struct nfq_handle *h) | ||
| 679 | free(h); | ||
| 680 | return ret; | ||
| 681 | } | ||
| 682 | -EXPORT_SYMBOL(nfq_close); | ||
| 683 | |||
| 684 | /** | ||
| 685 | * nfq_bind_pf - bind a nfqueue handler to a given protocol family | ||
| 686 | @@ -460,11 +454,10 @@ EXPORT_SYMBOL(nfq_close); | ||
| 687 | * | ||
| 688 | * \return integer inferior to 0 in case of failure | ||
| 689 | */ | ||
| 690 | -int nfq_bind_pf(struct nfq_handle *h, uint16_t pf) | ||
| 691 | +int __EXPORTED nfq_bind_pf(struct nfq_handle *h, uint16_t pf) | ||
| 692 | { | ||
| 693 | return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_BIND, 0, pf); | ||
| 694 | } | ||
| 695 | -EXPORT_SYMBOL(nfq_bind_pf); | ||
| 696 | |||
| 697 | /** | ||
| 698 | * nfq_unbind_pf - unbind nfqueue handler from a protocol family | ||
| 699 | @@ -476,11 +469,10 @@ EXPORT_SYMBOL(nfq_bind_pf); | ||
| 700 | * | ||
| 701 | * This call is obsolete, Linux kernels from 3.8 onwards ignore it. | ||
| 702 | */ | ||
| 703 | -int nfq_unbind_pf(struct nfq_handle *h, uint16_t pf) | ||
| 704 | +int __EXPORTED nfq_unbind_pf(struct nfq_handle *h, uint16_t pf) | ||
| 705 | { | ||
| 706 | return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_UNBIND, 0, pf); | ||
| 707 | } | ||
| 708 | -EXPORT_SYMBOL(nfq_unbind_pf); | ||
| 709 | |||
| 710 | |||
| 711 | /** | ||
| 712 | @@ -524,7 +516,7 @@ typedef int nfq_callback(struct nfq_q_handle *qh, | ||
| 713 | * The callback should return < 0 to stop processing. | ||
| 714 | */ | ||
| 715 | |||
| 716 | -struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h, | ||
| 717 | +struct nfq_q_handle __EXPORTED *nfq_create_queue(struct nfq_handle *h, | ||
| 718 | uint16_t num, | ||
| 719 | nfq_callback *cb, | ||
| 720 | void *data) | ||
| 721 | @@ -555,7 +547,6 @@ struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h, | ||
| 722 | add_qh(qh); | ||
| 723 | return qh; | ||
| 724 | } | ||
| 725 | -EXPORT_SYMBOL(nfq_create_queue); | ||
| 726 | |||
| 727 | /** | ||
| 728 | * @} | ||
| 729 | @@ -573,7 +564,7 @@ EXPORT_SYMBOL(nfq_create_queue); | ||
| 730 | * Removes the binding for the specified queue handle. This call also unbind | ||
| 731 | * from the nfqueue handler, so you don't have to call nfq_unbind_pf. | ||
| 732 | */ | ||
| 733 | -int nfq_destroy_queue(struct nfq_q_handle *qh) | ||
| 734 | +int __EXPORTED nfq_destroy_queue(struct nfq_q_handle *qh) | ||
| 735 | { | ||
| 736 | int ret = __build_send_cfg_msg(qh->h, NFQNL_CFG_CMD_UNBIND, qh->id, 0); | ||
| 737 | if (ret == 0) { | ||
| 738 | @@ -583,7 +574,6 @@ int nfq_destroy_queue(struct nfq_q_handle *qh) | ||
| 739 | |||
| 740 | return ret; | ||
| 741 | } | ||
| 742 | -EXPORT_SYMBOL(nfq_destroy_queue); | ||
| 743 | |||
| 744 | /** | ||
| 745 | * nfq_handle_packet - handle a packet received from the nfqueue subsystem | ||
| 746 | @@ -597,11 +587,10 @@ EXPORT_SYMBOL(nfq_destroy_queue); | ||
| 747 | * | ||
| 748 | * \return 0 on success, non-zero on failure. | ||
| 749 | */ | ||
| 750 | -int nfq_handle_packet(struct nfq_handle *h, char *buf, int len) | ||
| 751 | +int __EXPORTED nfq_handle_packet(struct nfq_handle *h, char *buf, int len) | ||
| 752 | { | ||
| 753 | return nfnl_handle_packet(h->nfnlh, buf, len); | ||
| 754 | } | ||
| 755 | -EXPORT_SYMBOL(nfq_handle_packet); | ||
| 756 | |||
| 757 | /** | ||
| 758 | * nfq_set_mode - set the amount of packet data that nfqueue copies to userspace | ||
| 759 | @@ -618,7 +607,7 @@ EXPORT_SYMBOL(nfq_handle_packet); | ||
| 760 | * | ||
| 761 | * \return -1 on error; >=0 otherwise. | ||
| 762 | */ | ||
| 763 | -int nfq_set_mode(struct nfq_q_handle *qh, | ||
| 764 | +int __EXPORTED nfq_set_mode(struct nfq_q_handle *qh, | ||
| 765 | uint8_t mode, uint32_t range) | ||
| 766 | { | ||
| 767 | union { | ||
| 768 | @@ -638,7 +627,6 @@ int nfq_set_mode(struct nfq_q_handle *qh, | ||
| 769 | |||
| 770 | return nfnl_query(qh->h->nfnlh, &u.nmh); | ||
| 771 | } | ||
| 772 | -EXPORT_SYMBOL(nfq_set_mode); | ||
| 773 | |||
| 774 | /** | ||
| 775 | * nfq_set_queue_flags - set flags (options) for the kernel queue | ||
| 776 | @@ -708,7 +696,7 @@ EXPORT_SYMBOL(nfq_set_mode); | ||
| 777 | * | ||
| 778 | * \return -1 on error with errno set appropriately; =0 otherwise. | ||
| 779 | */ | ||
| 780 | -int nfq_set_queue_flags(struct nfq_q_handle *qh, | ||
| 781 | +int __EXPORTED nfq_set_queue_flags(struct nfq_q_handle *qh, | ||
| 782 | uint32_t mask, uint32_t flags) | ||
| 783 | { | ||
| 784 | union { | ||
| 785 | @@ -729,7 +717,6 @@ int nfq_set_queue_flags(struct nfq_q_handle *qh, | ||
| 786 | |||
| 787 | return nfnl_query(qh->h->nfnlh, &u.nmh); | ||
| 788 | } | ||
| 789 | -EXPORT_SYMBOL(nfq_set_queue_flags); | ||
| 790 | |||
| 791 | /** | ||
| 792 | * nfq_set_queue_maxlen - Set kernel queue maximum length parameter | ||
| 793 | @@ -742,7 +729,7 @@ EXPORT_SYMBOL(nfq_set_queue_flags); | ||
| 794 | * | ||
| 795 | * \return -1 on error; >=0 otherwise. | ||
| 796 | */ | ||
| 797 | -int nfq_set_queue_maxlen(struct nfq_q_handle *qh, | ||
| 798 | +int __EXPORTED nfq_set_queue_maxlen(struct nfq_q_handle *qh, | ||
| 799 | uint32_t queuelen) | ||
| 800 | { | ||
| 801 | union { | ||
| 802 | @@ -760,7 +747,6 @@ int nfq_set_queue_maxlen(struct nfq_q_handle *qh, | ||
| 803 | |||
| 804 | return nfnl_query(qh->h->nfnlh, &u.nmh); | ||
| 805 | } | ||
| 806 | -EXPORT_SYMBOL(nfq_set_queue_maxlen); | ||
| 807 | |||
| 808 | /** | ||
| 809 | * @} | ||
| 810 | @@ -847,14 +833,13 @@ static int __set_verdict(struct nfq_q_handle *qh, uint32_t id, | ||
| 811 | * | ||
| 812 | * \return -1 on error; >= 0 otherwise. | ||
| 813 | */ | ||
| 814 | -int nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id, | ||
| 815 | +int __EXPORTED nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id, | ||
| 816 | uint32_t verdict, uint32_t data_len, | ||
| 817 | const unsigned char *buf) | ||
| 818 | { | ||
| 819 | return __set_verdict(qh, id, verdict, 0, 0, data_len, buf, | ||
| 820 | NFQNL_MSG_VERDICT); | ||
| 821 | } | ||
| 822 | -EXPORT_SYMBOL(nfq_set_verdict); | ||
| 823 | |||
| 824 | /** | ||
| 825 | * nfq_set_verdict2 - like nfq_set_verdict, but you can set the mark. | ||
| 826 | @@ -865,14 +850,13 @@ EXPORT_SYMBOL(nfq_set_verdict); | ||
| 827 | * \param data_len number of bytes of data pointed to by #buf | ||
| 828 | * \param buf the buffer that contains the packet data | ||
| 829 | */ | ||
| 830 | -int nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id, | ||
| 831 | +int __EXPORTED nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id, | ||
| 832 | uint32_t verdict, uint32_t mark, | ||
| 833 | uint32_t data_len, const unsigned char *buf) | ||
| 834 | { | ||
| 835 | return __set_verdict(qh, id, verdict, htonl(mark), 1, data_len, | ||
| 836 | buf, NFQNL_MSG_VERDICT); | ||
| 837 | } | ||
| 838 | -EXPORT_SYMBOL(nfq_set_verdict2); | ||
| 839 | |||
| 840 | /** | ||
| 841 | * nfq_set_verdict_batch - issue verdicts on several packets at once | ||
| 842 | @@ -886,13 +870,12 @@ EXPORT_SYMBOL(nfq_set_verdict2); | ||
| 843 | * batch support was added in Linux 3.1. | ||
| 844 | * These functions will fail silently on older kernels. | ||
| 845 | */ | ||
| 846 | -int nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id, | ||
| 847 | +int __EXPORTED nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id, | ||
| 848 | uint32_t verdict) | ||
| 849 | { | ||
| 850 | return __set_verdict(qh, id, verdict, 0, 0, 0, NULL, | ||
| 851 | NFQNL_MSG_VERDICT_BATCH); | ||
| 852 | } | ||
| 853 | -EXPORT_SYMBOL(nfq_set_verdict_batch); | ||
| 854 | |||
| 855 | /** | ||
| 856 | * nfq_set_verdict_batch2 - like nfq_set_verdict_batch, but you can set a mark. | ||
| 857 | @@ -901,13 +884,12 @@ EXPORT_SYMBOL(nfq_set_verdict_batch); | ||
| 858 | * \param verdict verdict to return to netfilter (NF_ACCEPT, NF_DROP) | ||
| 859 | * \param mark mark to put on packet | ||
| 860 | */ | ||
| 861 | -int nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id, | ||
| 862 | +int __EXPORTED nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id, | ||
| 863 | uint32_t verdict, uint32_t mark) | ||
| 864 | { | ||
| 865 | return __set_verdict(qh, id, verdict, htonl(mark), 1, 0, | ||
| 866 | NULL, NFQNL_MSG_VERDICT_BATCH); | ||
| 867 | } | ||
| 868 | -EXPORT_SYMBOL(nfq_set_verdict_batch2); | ||
| 869 | |||
| 870 | /** | ||
| 871 | * nfq_set_verdict_mark - like nfq_set_verdict, but you can set the mark. | ||
| 872 | @@ -923,14 +905,13 @@ EXPORT_SYMBOL(nfq_set_verdict_batch2); | ||
| 873 | * This function is deprecated since it is broken, its use is highly | ||
| 874 | * discouraged. Please, use nfq_set_verdict2 instead. | ||
| 875 | */ | ||
| 876 | -int nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id, | ||
| 877 | +int __EXPORTED nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id, | ||
| 878 | uint32_t verdict, uint32_t mark, | ||
| 879 | uint32_t data_len, const unsigned char *buf) | ||
| 880 | { | ||
| 881 | return __set_verdict(qh, id, verdict, mark, 1, data_len, buf, | ||
| 882 | NFQNL_MSG_VERDICT); | ||
| 883 | } | ||
| 884 | -EXPORT_SYMBOL(nfq_set_verdict_mark); | ||
| 885 | |||
| 886 | /** | ||
| 887 | * @} | ||
| 888 | @@ -965,12 +946,11 @@ EXPORT_SYMBOL(nfq_set_verdict_mark); | ||
| 889 | } __attribute__ ((packed)); | ||
| 890 | \endverbatim | ||
| 891 | */ | ||
| 892 | -struct nfqnl_msg_packet_hdr *nfq_get_msg_packet_hdr(struct nfq_data *nfad) | ||
| 893 | +struct nfqnl_msg_packet_hdr __EXPORTED *nfq_get_msg_packet_hdr(struct nfq_data *nfad) | ||
| 894 | { | ||
| 895 | return nfnl_get_pointer_to_data(nfad->data, NFQA_PACKET_HDR, | ||
| 896 | struct nfqnl_msg_packet_hdr); | ||
| 897 | } | ||
| 898 | -EXPORT_SYMBOL(nfq_get_msg_packet_hdr); | ||
| 899 | |||
| 900 | /** | ||
| 901 | * nfq_get_nfmark - get the packet mark | ||
| 902 | @@ -978,11 +958,10 @@ EXPORT_SYMBOL(nfq_get_msg_packet_hdr); | ||
| 903 | * | ||
| 904 | * \return the netfilter mark currently assigned to the given queued packet. | ||
| 905 | */ | ||
| 906 | -uint32_t nfq_get_nfmark(struct nfq_data *nfad) | ||
| 907 | +uint32_t __EXPORTED nfq_get_nfmark(struct nfq_data *nfad) | ||
| 908 | { | ||
| 909 | return ntohl(nfnl_get_data(nfad->data, NFQA_MARK, uint32_t)); | ||
| 910 | } | ||
| 911 | -EXPORT_SYMBOL(nfq_get_nfmark); | ||
| 912 | |||
| 913 | /** | ||
| 914 | * nfq_get_timestamp - get the packet timestamp | ||
| 915 | @@ -993,7 +972,7 @@ EXPORT_SYMBOL(nfq_get_nfmark); | ||
| 916 | * | ||
| 917 | * \return 0 on success, non-zero on failure. | ||
| 918 | */ | ||
| 919 | -int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) | ||
| 920 | +int __EXPORTED nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) | ||
| 921 | { | ||
| 922 | struct nfqnl_msg_packet_timestamp *qpt; | ||
| 923 | qpt = nfnl_get_pointer_to_data(nfad->data, NFQA_TIMESTAMP, | ||
| 924 | @@ -1006,7 +985,6 @@ int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) | ||
| 925 | |||
| 926 | return 0; | ||
| 927 | } | ||
| 928 | -EXPORT_SYMBOL(nfq_get_timestamp); | ||
| 929 | |||
| 930 | /** | ||
| 931 | * nfq_get_indev - get the interface that the packet was received through | ||
| 932 | @@ -1019,11 +997,10 @@ EXPORT_SYMBOL(nfq_get_timestamp); | ||
| 933 | * \warning all nfq_get_dev() functions return 0 if not set, since linux | ||
| 934 | * only allows ifindex >= 1, see net/core/dev.c:2600 (in 2.6.13.1) | ||
| 935 | */ | ||
| 936 | -uint32_t nfq_get_indev(struct nfq_data *nfad) | ||
| 937 | +uint32_t __EXPORTED nfq_get_indev(struct nfq_data *nfad) | ||
| 938 | { | ||
| 939 | return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_INDEV, uint32_t)); | ||
| 940 | } | ||
| 941 | -EXPORT_SYMBOL(nfq_get_indev); | ||
| 942 | |||
| 943 | /** | ||
| 944 | * nfq_get_physindev - get the physical interface that the packet was received | ||
| 945 | @@ -1033,11 +1010,10 @@ EXPORT_SYMBOL(nfq_get_indev); | ||
| 946 | * If the returned index is 0, the packet was locally generated or the | ||
| 947 | * physical input interface is no longer known (ie. POSTROUTING?). | ||
| 948 | */ | ||
| 949 | -uint32_t nfq_get_physindev(struct nfq_data *nfad) | ||
| 950 | +uint32_t __EXPORTED nfq_get_physindev(struct nfq_data *nfad) | ||
| 951 | { | ||
| 952 | return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSINDEV, uint32_t)); | ||
| 953 | } | ||
| 954 | -EXPORT_SYMBOL(nfq_get_physindev); | ||
| 955 | |||
| 956 | /** | ||
| 957 | * nfq_get_outdev - gets the interface that the packet will be routed out | ||
| 958 | @@ -1047,11 +1023,10 @@ EXPORT_SYMBOL(nfq_get_physindev); | ||
| 959 | * returned index is 0, the packet is destined for localhost or the output | ||
| 960 | * interface is not yet known (ie. PREROUTING?). | ||
| 961 | */ | ||
| 962 | -uint32_t nfq_get_outdev(struct nfq_data *nfad) | ||
| 963 | +uint32_t __EXPORTED nfq_get_outdev(struct nfq_data *nfad) | ||
| 964 | { | ||
| 965 | return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_OUTDEV, uint32_t)); | ||
| 966 | } | ||
| 967 | -EXPORT_SYMBOL(nfq_get_outdev); | ||
| 968 | |||
| 969 | /** | ||
| 970 | * nfq_get_physoutdev - get the physical interface that the packet output | ||
| 971 | @@ -1063,11 +1038,10 @@ EXPORT_SYMBOL(nfq_get_outdev); | ||
| 972 | * | ||
| 973 | * \return The index of physical interface that the packet output will be routed out. | ||
| 974 | */ | ||
| 975 | -uint32_t nfq_get_physoutdev(struct nfq_data *nfad) | ||
| 976 | +uint32_t __EXPORTED nfq_get_physoutdev(struct nfq_data *nfad) | ||
| 977 | { | ||
| 978 | return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSOUTDEV, uint32_t)); | ||
| 979 | } | ||
| 980 | -EXPORT_SYMBOL(nfq_get_physoutdev); | ||
| 981 | |||
| 982 | /** | ||
| 983 | * nfq_get_indev_name - get the name of the interface the packet | ||
| 984 | @@ -1107,13 +1081,12 @@ EXPORT_SYMBOL(nfq_get_physoutdev); | ||
| 985 | \endverbatim | ||
| 986 | * | ||
| 987 | */ | ||
| 988 | -int nfq_get_indev_name(struct nlif_handle *nlif_handle, | ||
| 989 | +int __EXPORTED nfq_get_indev_name(struct nlif_handle *nlif_handle, | ||
| 990 | struct nfq_data *nfad, char *name) | ||
| 991 | { | ||
| 992 | uint32_t ifindex = nfq_get_indev(nfad); | ||
| 993 | return nlif_index2name(nlif_handle, ifindex, name); | ||
| 994 | } | ||
| 995 | -EXPORT_SYMBOL(nfq_get_indev_name); | ||
| 996 | |||
| 997 | /** | ||
| 998 | * nfq_get_physindev_name - get the name of the physical interface the | ||
| 999 | @@ -1127,13 +1100,12 @@ EXPORT_SYMBOL(nfq_get_indev_name); | ||
| 1000 | * | ||
| 1001 | * \return -1 in case of error, > 0 if it succeed. | ||
| 1002 | */ | ||
| 1003 | -int nfq_get_physindev_name(struct nlif_handle *nlif_handle, | ||
| 1004 | +int __EXPORTED nfq_get_physindev_name(struct nlif_handle *nlif_handle, | ||
| 1005 | struct nfq_data *nfad, char *name) | ||
| 1006 | { | ||
| 1007 | uint32_t ifindex = nfq_get_physindev(nfad); | ||
| 1008 | return nlif_index2name(nlif_handle, ifindex, name); | ||
| 1009 | } | ||
| 1010 | -EXPORT_SYMBOL(nfq_get_physindev_name); | ||
| 1011 | |||
| 1012 | /** | ||
| 1013 | * nfq_get_outdev_name - get the name of the physical interface the | ||
| 1014 | @@ -1147,13 +1119,12 @@ EXPORT_SYMBOL(nfq_get_physindev_name); | ||
| 1015 | * | ||
| 1016 | * \return -1 in case of error, > 0 if it succeed. | ||
| 1017 | */ | ||
| 1018 | -int nfq_get_outdev_name(struct nlif_handle *nlif_handle, | ||
| 1019 | +int __EXPORTED nfq_get_outdev_name(struct nlif_handle *nlif_handle, | ||
| 1020 | struct nfq_data *nfad, char *name) | ||
| 1021 | { | ||
| 1022 | uint32_t ifindex = nfq_get_outdev(nfad); | ||
| 1023 | return nlif_index2name(nlif_handle, ifindex, name); | ||
| 1024 | } | ||
| 1025 | -EXPORT_SYMBOL(nfq_get_outdev_name); | ||
| 1026 | |||
| 1027 | /** | ||
| 1028 | * nfq_get_physoutdev_name - get the name of the interface the | ||
| 1029 | @@ -1168,13 +1139,12 @@ EXPORT_SYMBOL(nfq_get_outdev_name); | ||
| 1030 | * \return -1 in case of error, > 0 if it succeed. | ||
| 1031 | */ | ||
| 1032 | |||
| 1033 | -int nfq_get_physoutdev_name(struct nlif_handle *nlif_handle, | ||
| 1034 | +int __EXPORTED nfq_get_physoutdev_name(struct nlif_handle *nlif_handle, | ||
| 1035 | struct nfq_data *nfad, char *name) | ||
| 1036 | { | ||
| 1037 | uint32_t ifindex = nfq_get_physoutdev(nfad); | ||
| 1038 | return nlif_index2name(nlif_handle, ifindex, name); | ||
| 1039 | } | ||
| 1040 | -EXPORT_SYMBOL(nfq_get_physoutdev_name); | ||
| 1041 | |||
| 1042 | /** | ||
| 1043 | * nfq_get_packet_hw | ||
| 1044 | @@ -1198,12 +1168,11 @@ EXPORT_SYMBOL(nfq_get_physoutdev_name); | ||
| 1045 | } __attribute__ ((packed)); | ||
| 1046 | \endverbatim | ||
| 1047 | */ | ||
| 1048 | -struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad) | ||
| 1049 | +struct nfqnl_msg_packet_hw __EXPORTED *nfq_get_packet_hw(struct nfq_data *nfad) | ||
| 1050 | { | ||
| 1051 | return nfnl_get_pointer_to_data(nfad->data, NFQA_HWADDR, | ||
| 1052 | struct nfqnl_msg_packet_hw); | ||
| 1053 | } | ||
| 1054 | -EXPORT_SYMBOL(nfq_get_packet_hw); | ||
| 1055 | |||
| 1056 | /** | ||
| 1057 | * nfq_get_uid - get the UID of the user the packet belongs to | ||
| 1058 | @@ -1215,7 +1184,7 @@ EXPORT_SYMBOL(nfq_get_packet_hw); | ||
| 1059 | * | ||
| 1060 | * \return 1 if there is a UID available, 0 otherwise. | ||
| 1061 | */ | ||
| 1062 | -int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) | ||
| 1063 | +int __EXPORTED nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) | ||
| 1064 | { | ||
| 1065 | if (!nfnl_attr_present(nfad->data, NFQA_UID)) | ||
| 1066 | return 0; | ||
| 1067 | @@ -1223,7 +1192,6 @@ int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) | ||
| 1068 | *uid = ntohl(nfnl_get_data(nfad->data, NFQA_UID, uint32_t)); | ||
| 1069 | return 1; | ||
| 1070 | } | ||
| 1071 | -EXPORT_SYMBOL(nfq_get_uid); | ||
| 1072 | |||
| 1073 | /** | ||
| 1074 | * nfq_get_gid - get the GID of the user the packet belongs to | ||
| 1075 | @@ -1235,7 +1203,7 @@ EXPORT_SYMBOL(nfq_get_uid); | ||
| 1076 | * | ||
| 1077 | * \return 1 if there is a GID available, 0 otherwise. | ||
| 1078 | */ | ||
| 1079 | -int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) | ||
| 1080 | +int __EXPORTED nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) | ||
| 1081 | { | ||
| 1082 | if (!nfnl_attr_present(nfad->data, NFQA_GID)) | ||
| 1083 | return 0; | ||
| 1084 | @@ -1243,7 +1211,6 @@ int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) | ||
| 1085 | *gid = ntohl(nfnl_get_data(nfad->data, NFQA_GID, uint32_t)); | ||
| 1086 | return 1; | ||
| 1087 | } | ||
| 1088 | -EXPORT_SYMBOL(nfq_get_gid); | ||
| 1089 | |||
| 1090 | /** | ||
| 1091 | * nfq_get_secctx - get the security context for this packet | ||
| 1092 | @@ -1256,7 +1223,7 @@ EXPORT_SYMBOL(nfq_get_gid); | ||
| 1093 | * | ||
| 1094 | * \return -1 on error, otherwise > 0 | ||
| 1095 | */ | ||
| 1096 | -int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) | ||
| 1097 | +int __EXPORTED nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) | ||
| 1098 | { | ||
| 1099 | if (!nfnl_attr_present(nfad->data, NFQA_SECCTX)) | ||
| 1100 | return -1; | ||
| 1101 | @@ -1269,7 +1236,6 @@ int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) | ||
| 1102 | |||
| 1103 | return 0; | ||
| 1104 | } | ||
| 1105 | -EXPORT_SYMBOL(nfq_get_secctx); | ||
| 1106 | |||
| 1107 | /** | ||
| 1108 | * nfq_get_payload - get payload | ||
| 1109 | @@ -1282,7 +1248,7 @@ EXPORT_SYMBOL(nfq_get_secctx); | ||
| 1110 | * | ||
| 1111 | * \return -1 on error, otherwise > 0. | ||
| 1112 | */ | ||
| 1113 | -int nfq_get_payload(struct nfq_data *nfad, unsigned char **data) | ||
| 1114 | +int __EXPORTED nfq_get_payload(struct nfq_data *nfad, unsigned char **data) | ||
| 1115 | { | ||
| 1116 | *data = (unsigned char *) | ||
| 1117 | nfnl_get_pointer_to_data(nfad->data, NFQA_PAYLOAD, char); | ||
| 1118 | @@ -1291,7 +1257,6 @@ int nfq_get_payload(struct nfq_data *nfad, unsigned char **data) | ||
| 1119 | |||
| 1120 | return -1; | ||
| 1121 | } | ||
| 1122 | -EXPORT_SYMBOL(nfq_get_payload); | ||
| 1123 | |||
| 1124 | /** | ||
| 1125 | * @} | ||
| 1126 | @@ -1336,7 +1301,7 @@ do { \ | ||
| 1127 | * would have been printed into the buffer (in case that there is enough | ||
| 1128 | * room in it). See snprintf() return value for more information. | ||
| 1129 | */ | ||
| 1130 | -int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) | ||
| 1131 | +int __EXPORTED nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) | ||
| 1132 | { | ||
| 1133 | struct nfqnl_msg_packet_hdr *ph; | ||
| 1134 | struct nfqnl_msg_packet_hw *hwph; | ||
| 1135 | @@ -1489,7 +1454,6 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) | ||
| 1136 | |||
| 1137 | return len; | ||
| 1138 | } | ||
| 1139 | -EXPORT_SYMBOL(nfq_snprintf_xml); | ||
| 1140 | |||
| 1141 | /** | ||
| 1142 | * @} | ||
| 1143 | diff --git a/src/nlmsg.c b/src/nlmsg.c | ||
| 1144 | index ba28c77..5582407 100644 | ||
| 1145 | --- a/src/nlmsg.c | ||
| 1146 | +++ b/src/nlmsg.c | ||
| 1147 | @@ -30,7 +30,7 @@ | ||
| 1148 | * @{ | ||
| 1149 | */ | ||
| 1150 | |||
| 1151 | -void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) | ||
| 1152 | +void __EXPORTED nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) | ||
| 1153 | { | ||
| 1154 | struct nfqnl_msg_verdict_hdr vh = { | ||
| 1155 | .verdict = htonl(verdict), | ||
| 1156 | @@ -38,20 +38,17 @@ void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) | ||
| 1157 | }; | ||
| 1158 | mnl_attr_put(nlh, NFQA_VERDICT_HDR, sizeof(vh), &vh); | ||
| 1159 | } | ||
| 1160 | -EXPORT_SYMBOL(nfq_nlmsg_verdict_put); | ||
| 1161 | |||
| 1162 | -void nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark) | ||
| 1163 | +void __EXPORTED nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark) | ||
| 1164 | { | ||
| 1165 | mnl_attr_put_u32(nlh, NFQA_MARK, htonl(mark)); | ||
| 1166 | } | ||
| 1167 | -EXPORT_SYMBOL(nfq_nlmsg_verdict_put_mark); | ||
| 1168 | |||
| 1169 | -void | ||
| 1170 | +void __EXPORTED | ||
| 1171 | nfq_nlmsg_verdict_put_pkt(struct nlmsghdr *nlh, const void *pkt, uint32_t plen) | ||
| 1172 | { | ||
| 1173 | mnl_attr_put(nlh, NFQA_PAYLOAD, plen, pkt); | ||
| 1174 | } | ||
| 1175 | -EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt); | ||
| 1176 | |||
| 1177 | /** | ||
| 1178 | * @} | ||
| 1179 | @@ -85,7 +82,7 @@ EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt); | ||
| 1180 | * given protocol family. Both commands are ignored by Linux kernel 3.8 and | ||
| 1181 | * later versions. | ||
| 1182 | */ | ||
| 1183 | -void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) | ||
| 1184 | +void __EXPORTED nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) | ||
| 1185 | { | ||
| 1186 | struct nfqnl_msg_config_cmd command = { | ||
| 1187 | .command = cmd, | ||
| 1188 | @@ -93,9 +90,8 @@ void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) | ||
| 1189 | }; | ||
| 1190 | mnl_attr_put(nlh, NFQA_CFG_CMD, sizeof(command), &command); | ||
| 1191 | } | ||
| 1192 | -EXPORT_SYMBOL(nfq_nlmsg_cfg_put_cmd); | ||
| 1193 | |||
| 1194 | -void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) | ||
| 1195 | +void __EXPORTED nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) | ||
| 1196 | { | ||
| 1197 | struct nfqnl_msg_config_params params = { | ||
| 1198 | .copy_range = htonl(range), | ||
| 1199 | @@ -103,13 +99,11 @@ void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) | ||
| 1200 | }; | ||
| 1201 | mnl_attr_put(nlh, NFQA_CFG_PARAMS, sizeof(params), ¶ms); | ||
| 1202 | } | ||
| 1203 | -EXPORT_SYMBOL(nfq_nlmsg_cfg_put_params); | ||
| 1204 | |||
| 1205 | -void nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen) | ||
| 1206 | +void __EXPORTED nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen) | ||
| 1207 | { | ||
| 1208 | mnl_attr_put_u32(nlh, NFQA_CFG_QUEUE_MAXLEN, htonl(queue_maxlen)); | ||
| 1209 | } | ||
| 1210 | -EXPORT_SYMBOL(nfq_nlmsg_cfg_put_qmaxlen); | ||
| 1211 | |||
| 1212 | /** | ||
| 1213 | * @} | ||
| 1214 | @@ -179,12 +173,11 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data) | ||
| 1215 | * This function returns MNL_CB_ERROR if any error occurs, or MNL_CB_OK on | ||
| 1216 | * success. | ||
| 1217 | */ | ||
| 1218 | -int nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr) | ||
| 1219 | +int __EXPORTED nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr) | ||
| 1220 | { | ||
| 1221 | return mnl_attr_parse(nlh, sizeof(struct nfgenmsg), | ||
| 1222 | nfq_pkt_parse_attr_cb, attr); | ||
| 1223 | } | ||
| 1224 | -EXPORT_SYMBOL(nfq_nlmsg_parse); | ||
| 1225 | |||
| 1226 | /** | ||
| 1227 | * @} | ||
diff --git a/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb b/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.5.bb index 1bbab6f3cb..f806b0747e 100644 --- a/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb +++ b/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.5.bb | |||
| @@ -6,10 +6,9 @@ LICENSE = "GPLv2+" | |||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" |
| 7 | DEPENDS = "libnfnetlink libmnl" | 7 | DEPENDS = "libnfnetlink libmnl" |
| 8 | 8 | ||
| 9 | SRCREV = "601abd1c71ccdf90753cf294c120ad43fb25dc54" | 9 | SRCREV = "2ff321690b8dafeca99ee8e9cafac71e36f292b9" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://git.netfilter.org/libnetfilter_queue;branch=master \ | 11 | SRC_URI = "git://git.netfilter.org/libnetfilter_queue;branch=master \ |
| 12 | file://0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch \ | ||
| 13 | " | 12 | " |
| 14 | 13 | ||
| 15 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
