Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105014141
D36545.id110500.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36545.id110500.diff
View Options
Index: net/ng_mikrotik_eoip/files/patch-ng__mikrotik__eoip.c
===================================================================
--- /dev/null
+++ net/ng_mikrotik_eoip/files/patch-ng__mikrotik__eoip.c
@@ -0,0 +1,60 @@
+--- ng_mikrotik_eoip.c.orig 2022-09-13 07:45:40 UTC
++++ ng_mikrotik_eoip.c
+@@ -193,26 +193,54 @@ static ng_fn_eachhook check_id;
+ #ifndef NO_LINEAR_HOOK_LOOKUP
+ static ng_fn_eachhook check_id;
+
++#if __FreeBSD_version >= 1400057
++struct check_id_data {
++ hook_p result;
++ uint16_t id;
++};
++#endif
++
+ static int
+-check_id(hook_p hook, void *id)
++check_id(hook_p hook, void *arg)
+ {
+ struct tunnel_info *info = NG_HOOK_PRIVATE(hook);
++#if __FreeBSD_version >= 1400057
++ struct check_id_data *data = arg;
++#endif
++ uint16_t id;
+
+- if (info != NULL && info->id == (uint16_t)(*((unsigned int *)id)))
++#if __FreeBSD_version >= 1400057
++ id = data->id;
++#else
++ id = *((unsigned int *)id;
++#endif
++ if (info != NULL && info->id == id) {
++#if __FreeBSD_version >= 1400057
++ data->result = hook;
++#endif
+ return 0;
+- else
++ } else
+ return 1;
+ }
+
+ static hook_p
+ find_hook(node_p node, uint16_t id)
+ {
++#if __FreeBSD_version >= 1400057
++ struct check_id_data data;
++
++ data.result = NULL;
++ data.id = id;
++ NG_NODE_FOREACH_HOOK(node, check_id, &data);
++ return data.result;
++#else
+ hook_p result = NULL;
+ unsigned int val = id;
+
+ NG_NODE_FOREACH_HOOK(node, check_id, (void*)&val, result);
+
+ return result;
++#endif
+ }
+ #endif /* NO_LINEAR_HOOK_LOOKUP */
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 12, 3:36 PM (5 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15325755
Default Alt Text
D36545.id110500.diff (1 KB)
Attached To
Mode
D36545: net/ng_mikrotik_eoip: Fix build after recent changes in main.
Attached
Detach File
Event Timeline
Log In to Comment