[Home]

Summary:ASTERISK-06633: [patch] Allow to assign names to nethdlc interfaces.
Reporter:Mikhail Khelik (mixel)Labels:
Date Opened:2006-03-28 04:51:16.000-0600Date Closed:2006-05-11 17:50:41
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) zaptel_trunk_1051_add_ifname.diff
Description:We plan to use Zaptel driver as a core of TDM access platform. By default hdlc interfaces numbered sequentially. The first nethdlc in zaptel.conf will be hdlc0, the second hdlc1 and so on. If we split bunched hdlc zaptel channel, after the next restart names for the following nethdlc interfaces will be changed, it's not convenient in terms of billing and static routing. We need more deterministic name policy. My patch provides opportunity to assign names to nethdlc interfaces, by extending old syntax.
New syntax:
 nethdlc=<channel list>[:interface name]
[Interface name] is optional parameter.
This feature is not available on 2.4.x kernels.
Comments:By: Mikhail Khelik (mixel) 2006-03-31 03:01:46.000-0600

Hm.. starange, looks like somebody return things to 982 revision... I've renewed the patch for this rev.

By: Tilghman Lesher (tilghman) 2006-05-06 09:23:23

Couple things are needed still for this patch, mostly stylistic, to comply with the coding guidelines:

1) if statements have the opening curly brace on the same line.
2) on the second hunk, get rid of the two calls to differing functions.  Just use the zt_* function and pass NULL or not, using the tercery operator.
3) on the fifth hunk, you should use sizeof() to figure out the last position of the array, instead of hardcoding 15/16.  Also, it's preferred that the third parameter to strncpy be "sizeof(cc[x].netdev_name) - 1".

Otherwise, looks like a great patch, and I'm happy to see it through.

By: Mikhail Khelik (mixel) 2006-05-11 02:49:14

Ok, new version was uploaded.

By: Tilghman Lesher (tilghman) 2006-05-11 17:50:41

Committed to trunk, revision 1053.