Bug 50987 - shell error on ip show route
Summary: shell error on ip show route
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: openfortivpn (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Konstantin A Lepikhov (L.A. Kostis)
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-29 06:00 MSK by Худолей Артём
Modified: 2024-08-05 10:11 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Худолей Артём 2024-07-29 06:00:55 MSK
При подключении к vpn, выполняется команда с !%s. Шел его интерпретирует как управляющий символ. 
```
INFO:   Interface ppp0 is UP.
INFO:   Setting new routes...
DEBUG:  ip route show to 0.0.0.0/0.0.0.0 dev !ppp0
ERROR:  : No such file or directory.
WARN:   Could not get current default route (unknown).
WARN:   Protecting tunnel route has failed. But this can be working except for some cases.
DEBUG:  ip route add to 10.0.0.0/255.0.0.0 dev ppp0
DEBUG:  ip route add to 172.16.0.0/255.240.0.0 dev ppp0
INFO:   Adding VPN nameservers...
```

```
https://github.com/adrienverge/openfortivpn/blob/c49663d267429d89cd6c5c4f8a5bfa9af011fd46/src/ipv4.c#L746
        sprintf(route_iface(def_rt), "!%s", tunnel->ppp_iface);
```

При изменении данной строки на:
```
sprintf(route_iface(def_rt), "\!%s", tunnel->ppp_iface);
```

Ошибка пропадает и маршруты успешно добавляются.
Comment 1 Konstantin A Lepikhov (L.A. Kostis) 2024-07-29 10:24:58 MSK
https://packages.altlinux.org/en/tasks/353860/ можете проверить с этой версией?
Comment 2 Repository Robot 2024-08-05 10:11:27 MSK
openfortivpn-1.22.1-alt1 -> sisyphus:

 Mon Jul 29 2024 L.A. Kostis <lakostis@altlinux.ru> 1.22.1-alt1
 - 1.22.1.
 - escape shell symbols in route cmd (closes #50987).