Since the address is now stored in its original network byte order,
let's annotate that this is indeed the case.
*/
struct peer {
struct list_head head;
- uint32_t ip;
+ __be32 ip;
uint8_t proto;
uint32_t id_port_knocked;
enum status status;
* @ip
* @return: peer or NULL
*/
-static struct peer *get_peer(struct xt_pknock_rule *rule, uint32_t ip)
+static struct peer *get_peer(struct xt_pknock_rule *rule, __be32 ip)
{
struct peer *peer;
struct list_head *pos, *n;
* @proto
* @return: peer or NULL
*/
-static struct peer *new_peer(uint32_t ip, uint8_t proto)
+static struct peer *new_peer(__be32 ip, uint8_t proto)
{
struct peer *peer = kmalloc(sizeof(*peer), GFP_ATOMIC);
struct xt_pknock_nl_msg {
char rule_name[XT_PKNOCK_MAX_BUF_LEN+1];
- uint32_t peer_ip;
+ __be32 peer_ip;
};
#endif /* _XT_PKNOCK_H */