omec-project/upf

PFCPagent crashes when sending PDRs that allocate UE IPs and `enable_ue_ip_alloc = false`

pudelkoM opened this issue · 5 comments

Describe the bug
PFCPagent crashes when sending PDRs that allocate UE IPs and enable_ue_ip_alloc = false

To Reproduce
Disable UE IP alloc and send PDR with ie.NewUEIPAddress(0x0, "", "", 0, 0),

Expected behavior
Return error inserting the PDR.

Logs

INFO[2021-12-10T02:36:41Z]/pfcpiface/parse-pdr.go:104 main.(*pdr).parsePDI() UPF should alloc UE IP. CHV4 flag set
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9b2841]

goroutine 66 [running]:
main.(*IPPool).AllocIP(0x0)
	/pfcpiface/ip_pool.go:42 +0x61
main.(*pdr).parsePDI(0xc00010fcc0, {0xc000598520, 0x4, 0x9d01e2}, 0xc000532420, 0xc000619b60)
	/pfcpiface/parse-pdr.go:106 +0x452
main.(*pdr).parsePDR(0xc00010fcc0, 0xc0005b7180, 0xc8a3b1883c29be52, 0xc00010fa98, 0x40cc94)
	/pfcpiface/parse-pdr.go:290 +0x165
main.(*PFCPConn).handleSessionEstablishmentRequest(0xc0005d2000, {0xc65b40, 0xc000392500})
	/pfcpiface/messages-session.go:93 +0x545
main.(*PFCPConn).HandlePFCPMsg(0xc0005d2000, {0xc0005fa000, 0x230, 0x240})
	/pfcpiface/messages.go:95 +0x4b6
main.(*PFCPConn).Serve.func1()
	/pfcpiface/conn.go:188 +0xec
created by main.(*PFCPConn).Serve
	/pfcpiface/conn.go:175 +0x5f

Didn't mean to close this

This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.

This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.

keep open

This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.