History

net: sctp: fix passing wrong parameter header to param_type2af in sctp_process_param

When making use of RFC5061, section 4.2.4. for setting the primary IP address, we're passing a wrong parameter header to param_type2af(), resulting always in NULL being returned. At this point, param.p points to a sctp_addip_param struct, containing a sctp_paramhdr (type = 0xc004, length = var), and crr_id as a correlation id. Followed by that, as also presented in RFC5061 section 4.2.4., comes the actual sctp_addr_param, which also contains a sctp_paramhdr, but this time with the correct type SCTP_PARAM_IPV{4,6}_ADDRESS that param_type2af() can make use of. Since we already hold a pointer to addr_param from previous line, just reuse it for param_type2af().

Saran Maruti Ramanara committed 11 years ago

Commit cfbf6541 parent 8b7c36d1 file · +1 −1Browse files

Unified · Split

net/sctp/sm_make_chunk.c+1−1
@@ -2608,7 +2608,7 @@ do_addr_param: · 2607 unmodified lines
2608 2608
2609 addr_param = param.v + sizeof(sctp_addip_param_t);2609 addr_param = param.v + sizeof(sctp_addip_param_t);
2610 2610
2611 af = sctp_get_af_specific(param_type2af(param.p->type));2611 af = sctp_get_af_specific(param_type2af(addr_param->p.type));
2612 if (af == NULL)2612 if (af == NULL)
2613 break;2613 break;
2614 2614

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t