Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ac/ac.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <pthread.h>
#include <linux/if_ether.h>
#include <json/json.h>
#include <json-c/json.h>

#include <ac_kmod.h>

Expand Down
6 changes: 3 additions & 3 deletions src/ac/ac_dfa_configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "ac_session.h"
#include "ac_json.h"
#include "ac_wlans.h"
#include <json/json.h>
#include <json-c/json.h>
#include <arpa/inet.h>

/* */
Expand Down Expand Up @@ -453,7 +453,7 @@ static uint32_t ac_dfa_state_configure_create_response(struct ac_session_t* sess
int j;

for (j = 0; j < length; j++) {
struct json_object* jsonvalue = json_object_array_get_idx(jsonelement, i);
struct json_object* jsonvalue = json_object_array_get_idx(jsonelement, j);
if (jsonvalue && (json_object_get_type(jsonvalue) == json_type_object)) {
struct json_object* jsonitem;

Expand Down Expand Up @@ -540,7 +540,7 @@ static uint32_t ac_dfa_state_configure_create_response(struct ac_session_t* sess
responseacipv4list->addresses = capwap_array_create(sizeof(struct in_addr), 0, 0);

for (j = 0; j < length; j++) {
struct json_object* jsonvalue = json_object_array_get_idx(jsonelement, i);
struct json_object* jsonvalue = json_object_array_get_idx(jsonelement, j);
if (jsonvalue && (json_object_get_type(jsonvalue) == json_type_object)) {
struct json_object* jsonitem;

Expand Down
2 changes: 1 addition & 1 deletion src/ac/ac_dfa_datacheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "capwap_array.h"
#include "ac_session.h"
#include "ac_json.h"
#include <json/json.h>
#include <json-c/json.h>

/* */
static struct ac_soap_response* ac_dfa_state_datacheck_parsing_request(struct ac_session_t* session, struct capwap_parsed_packet* packet) {
Expand Down
2 changes: 1 addition & 1 deletion src/ac/ac_dfa_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "ac_session.h"
#include "ac_backend.h"
#include "ac_json.h"
#include <json/json.h>
#include <json-c/json.h>
#include <arpa/inet.h>

/* */
Expand Down
2 changes: 1 addition & 1 deletion src/ac/ac_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __AC_JSON_HEADER__

#include "capwap_array.h"
#include <json/json.h>
#include <json-c/json.h>

#define IEEE80211_BINDING_JSON_ROOT "WTPRadio"

Expand Down
6 changes: 6 additions & 0 deletions src/ac/kmod/capwap_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/etherdevice.h>
#include <linux/smp.h>
#include <linux/lockdep.h>
#include <linux/version.h>
#include <net/ipv6.h>
#include <net/cfg80211.h>
#include "socket.h"
Expand Down Expand Up @@ -411,8 +412,13 @@ static int sc_capwap_thread_recvpacket(struct sk_buff* skb) {
TRACEKMOD("*** Receive SKB_CAPWAP_FLAG_FROM_AC_TAP\n");

/* Retrieve VLAN */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
if (skb_vlan_tag_present(skb)) {
vlan = skb_vlan_tag_get_id(skb);
#else
if (vlan_tx_tag_present(skb)) {
vlan = vlan_tx_tag_get_id(skb);
#endif
} else if (eh->h_proto == htons(ETH_P_8021Q)) {
vlan = ntohs(vlan_eth_hdr(skb)->h_vlan_TCI) & VLAN_VID_MASK;

Expand Down
5 changes: 5 additions & 0 deletions src/ac/kmod/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/smp.h>
#include <linux/version.h>
#include "iface.h"
#include "station.h"
#include "capwap.h"
Expand Down Expand Up @@ -175,7 +176,11 @@ int sc_iface_create(const char* ifname, uint16_t mtu) {
TRACEKMOD("### sc_iface_create\n");

/* Create interface */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
dev = alloc_netdev(sizeof(struct sc_netdev_priv), ifname, NET_NAME_UNKNOWN, sc_iface_netdev_setup);
#else
dev = alloc_netdev(sizeof(struct sc_netdev_priv), ifname, sc_iface_netdev_setup);
#endif
if (!dev) {
return -ENOMEM;
}
Expand Down