diff -uNr linux-2.4.23/include/linux/netfilter_ipv4/ip_queue.h linux-2.4.23-brcontrol/include/linux/netfilter_ipv4/ip_queue.h --- linux-2.4.23/include/linux/netfilter_ipv4/ip_queue.h 2000-08-10 21:35:15.000000000 +0200 +++ linux-2.4.23-brcontrol/include/linux/netfilter_ipv4/ip_queue.h 2003-12-22 14:50:49.000000000 +0100 @@ -47,9 +47,17 @@ unsigned char payload[0]; /* Optional replacement packet */ } ipq_verdict_msg_t; +// IPQ_mark patch for BRControl +typedef struct ipq_mark_msg { + unsigned long id; /* Packet ID for this verdict */ + unsigned long mark_value; /* Value to set packet mark field to */ +} ipq_mark_msg_t; +// End of IPQ_mark patch + typedef struct ipq_peer_msg { union { ipq_verdict_msg_t verdict; + ipq_mark_msg_t mark; /* Used by ipq_set_mark from BRcontrol */ ipq_mode_msg_t mode; } msg; } ipq_peer_msg_t; @@ -67,6 +75,7 @@ #define IPQM_MODE (IPQM_BASE + 1) /* Mode request from peer */ #define IPQM_VERDICT (IPQM_BASE + 2) /* Verdict from peer */ #define IPQM_PACKET (IPQM_BASE + 3) /* Packet from kernel */ +#define IPQM_MARK (IPQM_BASE + 4) /* Packet to be marked for peer, used by ipq_set_mark from BRcontrol */ #define IPQM_MAX (IPQM_BASE + 4) #endif /*_IP_QUEUE_H*/ diff -uNr linux-2.4.23/net/ipv4/netfilter/ip_queue.c linux-2.4.23-brcontrol/net/ipv4/netfilter/ip_queue.c --- linux-2.4.23/net/ipv4/netfilter/ip_queue.c 2003-06-13 16:51:39.000000000 +0200 +++ linux-2.4.23-brcontrol/net/ipv4/netfilter/ip_queue.c 2003-12-22 14:10:04.000000000 +0100 @@ -415,6 +415,24 @@ write_unlock_bh(&queue_lock); return status; } +//ipq_set_mark patch for BRcontrol +static int +ipq_set_mark(ipq_mark_msg_t *vmsg, unsigned int len) +{ + struct ipq_queue_entry *entry; + + entry = ipq_find_dequeue_entry(id_cmp, vmsg->id); + if (entry == NULL) + return -ENOENT; + else { + entry->skb->nfmark = vmsg->mark_value; + //nf_reinject(entry->skb, entry->info, NF_ACCEPT); + ipq_issue_verdict(entry,NF_ACCEPT); + //kfree(e); + return 0; + } +} +//end of ipq_set_mark patch for BRcontrol static int ipq_receive_peer(struct ipq_peer_msg *pmsg,