Skip to content

Commit

Permalink
update function check_urr. do not add packet count when volume is zero (
Browse files Browse the repository at this point in the history
  • Loading branch information
chen042531 committed Jan 16, 2024
1 parent 76665a8 commit 1eab6ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/genl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "genl.h"

#define DRV_VERSION "0.8.3"
#define DRV_VERSION "0.8.4"

enum gtp5g_version {
GTP5G_VERSION
Expand Down
5 changes: 5 additions & 0 deletions src/gtpu/encap.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ int check_urr(struct pdr *pdr, struct far *far, u64 vol, u64 vol_mbqe, bool upli
bool mnop;
struct sk_buff *skb;

// volume is zero(payload is zero), no need to add volume and packet count
if (vol == 0) {
return ret;
}

urrs = kzalloc(sizeof(struct urr *) * pdr->urr_num , GFP_ATOMIC);
triggers = kzalloc(sizeof(u32) * pdr->urr_num , GFP_ATOMIC);
if (!urrs || !triggers) {
Expand Down

0 comments on commit 1eab6ac

Please sign in to comment.